On 5/21/2011 9:07 AM, Robert Clipsham wrote:
The install instructions mentioned eariler that started this whole debate has an
installer which has an option to sort out line endings, is that not what you
need? (see the screenshots on the link provided).

There seem to be at least 6 ways of dealing with this on git. The documentation on each of them is execrable.

Git just has a fundamental problem with it - that is, git wants to make a unique hash for each file. That hash works on the binary contents of a file. Git also works with binary files.

So, what do you do with a file with CRLFs? Is it or is it not a binary file? Do you autodetect it and risk messing up a "binary" file? When you check in a file with CRLFs, do you convert it first to LFs? What happens when you check that file out? Do CRLFs get restored or not? Is a file "changed" if only CR's were added/deleted? How do you detect that?

There simply isn't a correct answer, and the 6 ways and their schizo documentation are utterly unclear about these issues.

The answer (for me) is to always strip CR's before git ever sees the files. Voila, no more issues.

Reply via email to