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

Re: core.autocrlf considered half-assed

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:48:24

Hi,

On Mon, 8 Mar 2010, Tait wrote:
quoted
I do agree. It would probably have been a good idea to mark the CRLF 
status in the index, but we didn't...
We already have .gitattributes for tracking information about files. 
Maybe add an attribute to describe the in-repository line endings? The 
default would be LF, as now, and a new attribute could change the 
checked-in format to be CRLF.
No.

The problem is not the description of the line endings in the repository. 
The information what line endings are used can be easily extracted from 
every blob, by a simple inspection.

The problem is that the core.autocrlf code blindly assumes that Unix line 
endings are the only thing you would ever commit. And worse, the mistake 
is repeated when updating the index. Git converts the DOS line endings 
into Unix line endings, then compares with what it has in the repository 
and says: "Ooops, it is different!" even if it just checked the files out.

And I demonstrated with the "html" example that even long-time Gitsters 
sometimes commit DOS line endings as-are, unconverted.

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