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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Thu, 24 Jul 2008, Steffen Prohaska wrote:

> On Jul 24, 2008, at 4:38 PM, Johannes Schindelin wrote:
> 
> >On Thu, 24 Jul 2008, Dmitry Potapov wrote:
> >
> > >On Thu, Jul 24, 2008 at 08:06:29AM +0200, Steffen Prohaska wrote:
> > > >
> > > > 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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux