Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Line endings

All text files in must be normalized so that lines terminate in the unix style (LF). Please .  In the past, we have had a mixture of termination styles.  Shortly after the migration to Git the master and maintenance branches were normalized to LF.  Please do not commit files that terminate in CRLF!

...

  • autocrlf = input. Use on unix-like platforms. This will perform no conversion upon checkout, but will normalize any crlf files upon commit.
  • autocrlf = true. Use only on Useful on Windows platforms. This will have the effect of converting all text files into dos-style (CRLF) in the working copy upon checkout. Upon commit, all files will be normalized to LF on their way into the repository, but remain in CRLF in the local working copy directory.

...

These versions of git may apply/detect autocrlf settings to all files in the working copy immediately. Thus, if checking out older branches/tags/commits that still have crlf files in the repository, these files will be seen as automatically 'modified' when doing a 'git status'. This may have confusing side-effects.  When working with older branches containing a mixture of line endings, you may want to either turn autocrlf off, or just go ahead and convert all files in the branch to LF.

Git 1.7.2+

These versions of git heed the .gitattributes directive, so it is not strictly necessary to set autocrlf, but it is recommended.

...

Text files were normalized to use LF in commit 5275b...  Any existing branches/tags that are not normalized may contain a mix of files.  Merging changes from a crlf file into a normalized branch may be problematic. In particular, merging any modified crlf file into its normalized counterpart will produce a conflict with a whole-file diff (i.e. it will appear as the entire file is in conflict).     Converting any such files to use LF endings in the originating (old) branch is a reasonable solution, and will result in merges that behave as expected.