Skip to content
  1. Sep 12, 2014
    • Ray Satiro's avatar
      newlines: fix mixed newlines to LF-only · 006b61eb
      Ray Satiro authored
      I use the curl repo mainly on Windows with the typical Windows git
      checkout which converts the LF line endings in the curl repo to CRLF
      automatically on checkout. The automatic conversion is not done on files
      in the repo with mixed line endings. I recently noticed some weird
      output with projects/build-openssl.bat that I traced back to mixed line
      endings, so I scanned the repo and there are files (excluding the
      test data) that have mixed line endings.
      
      I used this command below to do the scan. Unfortunately it's not as easy
      as git grep, at least not on Windows. This gets the names of all the
      files in the repo's HEAD, gets each of those files raw from HEAD, checks
      for mixed line endings of both LF and CRLF, and prints the name if
      mixed. I excluded path tests/data/test* because those can have mixed
      line endings if I understand correctly.
      
      for f in `git ls-tree --name-only --full-tree -r HEAD`;
      do if [ -n "${f##tests/data/test*}" ];
          then git show "HEAD:$f" | \
           ...
      006b61eb
  2. Sep 11, 2014
  3. Sep 10, 2014
  4. Sep 09, 2014
  5. Sep 08, 2014
  6. Sep 07, 2014
  7. Sep 06, 2014
  8. Sep 05, 2014
  9. Sep 04, 2014