Re: mingw, windows, crlf/lf, and git
- From
Linus Torvalds <torvalds@linux-foundation.org>
- Date
- Feb 13, 2007, 23:28 UTC
- Message-ID
- <Pine.LNX.4.64.0702131524130.3604@woody.linux-foundation.org>
- In-Reply-To
- <20070213204248.GA21046@uranus.ravnborg.org>
On Tue, 13 Feb 2007, Sam Ravnborg wrote:
> > This whole auto CRLF things seems to deal with DOS issues that I personally > have not encountered since looong time ago.
Maybe you stopped using DOS a loong time ago ;)
It's definitely an issue. Yes, all windows programs basically *understand* files that have just LF. But almost all of them will *write* files with CRLF.
(Which means that I suspect I made the default for "auto_crlf" be wrong in my patch: I probably should not default to checking out with CRLF, but checking out with just LF, and only do the CRLF->LF conversion on input).
Anybody who has ever worked with _any_ Windows people have long since learnt that they always end up having to convert CRLF to just LF when they get files. Even _I_ know it, and I seldom have to work with people who use Windows ;)
So it's a good idea to try to make sure that Windows users don't corrupt files by adding CRLF where there is no need for them into a git archive. We hope to convert those people to a real OS some day ("here's a nickel, boy"), and to make it easier for them to do it, making sure that their projects in -git are already in a sane format is probably a good idea.
Linus