Thread (9 messages) flat view 9 messages, 4 authors, 2016-06-15

Re: core.autocrlf considered half-assed

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2016-06-15 22:48:24


On Sun, 7 Mar 2010, Dmitry Potapov wrote:
Well, I agree there are some issues with it. In particularly, when
someone changes core.autocrlf in his/her repository, and then git
behavior is outright confusing. IMHO, the nuts of the problem is that
does not store in the index how files were checkout. Instead it uses
core.autocrlf, which specifies how the user _wants_ files to be check-
out. So, when the autocrlf option changes, things get very confusing.
I do agree. It would probably have been a good idea to mark the CRLF 
status in the index, but we didn't. And crlf isn't actually the _only_ 
thing that can cause confusion, the 'ident' and 'filter' can do the same 
thing.

One option might be to have "git config" know about crlf, so that if you 
change crlf state with 'git config' rather than manually, we could at 
least _warn_ about the effects and tell people that they may need to do a 
full new checkout (or reset the stat info in the index, or whatever). But 
I like editing config files by hand, and I don't think I'm the only one.

			Linus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help