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

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

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

Hi,

On Thu, 24 Jul 2008, Steffen Prohaska wrote:
On Jul 24, 2008, at 4:38 PM, Johannes Schindelin wrote:
quoted
On Thu, 24 Jul 2008, Dmitry Potapov wrote:
quoted
On Thu, Jul 24, 2008 at 08:06:29AM +0200, Steffen Prohaska wrote:
quoted
I am the maintainer of this project.  I know that this project 
needs crlf conversion, because it is a cross-platform project. 
Therefore, I want to force crlf conversion for this specific 
project, even if the user did not configure core.autocrlf=input on 
Unix.
I suspect that most problems with crlf is caused by Windows users who 
have core.autocrlf=false for whatever reason (I suspect without a 
good reason in most cases).
Almost correct.  It is _unset_!  And it should be perfectly valid for 
users not having to set anything there.
Why is it unset?  Since 1.5.5, our installer sets core.autocrlf=true
on Windows.  So we *do* set a sane default for Windows users.
As I mentioned earlier, these users use Cygwin's Git.  And they do not 
update frequently.
In the projects I am using git, the problematic platform is *Unix*. To 
work around the default on Unix (core.autocrlf=false), I deliver a 
custom script to our developers that verifies the setup on Unix and 
complains if core.autocrlf is not set to "input".  Since I do this, I 
haven't seen any further problems.
That is exactly the use case I had in mind for my patch.  If we already 
bother to mark the files with crlf=input in .gitattributes, then Git could 
be so nice to respect it.

However, I see Junio's point: on sane platforms you have to work hard to 
get CR-damaged files.  And the regular sane platform user should not be 
punished for the brain/CR damage a certain monopolist has brought over 
this planet.

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