Re: CRLF problems with Git on Win32
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 9, 2008, 08:03 UTC
- Message-ID
- <7vd4sbmnmz.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <alpine.LFD.1.00.0801081232120.3148@woody.linux-foundation.org>
Linus Torvalds <torvalds@linux-foundation.org> writes:
Show 23 quoted lines
> On Tue, 8 Jan 2008, Junio C Hamano wrote: >> >> I think the project can mark text files as text with attributes >> and if the port to the platform initialized core.autocrlf >> appropriately for the platform everything should work as you >> described. > > Yes, I think core.autocrlf should default to "true" on Windows, since > that is what it's about. The alternative is to have "fail"/"warn", to just > make sure that nobody can do the wrong thing by mistake. > > We could just do something like this, although that probably does mean > that the whole test-suite needs to be double-checked (ie now we really do > behave differently on windows outside of any config options!)) > > People who really dislike it can always do the > > git config --global core.autocrlf false > > thing. > > (And no, I don't know if "#ifdef __WINDOWS__" is the right thing to do, > it's almost certainly not. This is just a draft.)
Perhaps we can do something similar to core.filemode? Create a file that we would need to create anyway in "text" mode, and read it back in "binary" mode to see what stdio did?