Re: [PATCH] Respect crlf attribute even if core.autocrlf has not been set

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] Respect crlf attribute even if core.autocrlf has not been set

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:45:00

Robin Rosenberg [off-list ref] writes:
quoted
There are certain file formats, such as a Visual Studio .sln file, that 
MUST be CRLF.  When a .sln file is not CRLF, Visual Studio refuses to 
read it.  I want to be able to set into the committed .gitattributes 
file the list of files that must be translated to the proper format 
regardless of the autocrlf setting.  An example is below:

*.bat crlf
...
quoted
*.vcw crlf
Wouldn't  "*bat -crlf " etc be good for these, and thus store CRLF in the repo.
I'd agree.  And I do not think we would want to introduce "crlf=force"
that converts working tree files that could be LF terminated to CRLF upon
checking in.  That is as bad as some helpful editors that adds CR at the
end of line without being asked.

Re: [PATCH] Respect crlf attribute even if core.autocrlf has not been set

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:45:00

Hi,

On Wed, 23 Jul 2008, Junio C Hamano wrote:
Robin Rosenberg [off-list ref] writes:
quoted
quoted
There are certain file formats, such as a Visual Studio .sln file, 
that MUST be CRLF.  When a .sln file is not CRLF, Visual Studio 
refuses to read it.  I want to be able to set into the committed 
.gitattributes file the list of files that must be translated to the 
proper format regardless of the autocrlf setting.  An example is 
below:

*.bat crlf
...
quoted
*.vcw crlf
Wouldn't "*bat -crlf " etc be good for these, and thus store CRLF in 
the repo.
I'd agree.  And I do not think we would want to introduce "crlf=force" 
that converts working tree files that could be LF terminated to CRLF 
upon checking in.  That is as bad as some helpful editors that adds CR 
at the end of line without being asked.
You can say that only because you are not in the situation having a lot of 
CR/LF files in your _public_ repository _in spite of_ setting the 
gitattributes correctly.

That seriously sucks.

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