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

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:
Johannes Schindelin [off-list ref] writes:
quoted
However, if you want to avoid CRs to _enter_ the repository, when you 
have a lot of binary files tracked, you _do_ want to force all 
repositories to crlf=input.
If you are on a sane system, you do not even want to pay the price of 
conversion.  Only people on systems with CRLF line endings should pay 
the price (because your aim is to convert on such systems).  Are we 
throwing that out of the window when the project decides to use 
gitattributes?
Well, if you do not want that, why do you set crlf in the gitattributes to 
begin with?
How about setting autocrlf automatically on mingw/msys/cygwin versions, 
perhaps via templates or a patch to init-db?  Would that, combined with 
user education, be a viable alternative?
On msys we do that.  A few users decided they know better and switched it 
off.  Me for example.  But I wouldn't do something as stupid as editing a 
file with an editor that tries to be helpful and adds CR/LFs.

However, Cygwin?  No, they don't.  I don't see them change it, either.

The _only_ way we could do that is by setting auto_crlf in environment, 
depending on the platform.

HOWEVER: as you can see from the git-svn post this morning, there are 
known issues with autocrlf.

We also had much fun (not!) with a lot of users who were really happy to 
insult us for the change to set autocrlf to true by default (via 
/etc/gitconfig) in msysGit.

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