Re: CRLF problems with Git on Win32

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

 



On 7/1/08 22:58, "Linus Torvalds" <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:

> Well, one thng we could do is to add a new concept, namely
> 
> core.autocrlf = warn
> 
> and make *that* the default.
> 
> It would do the check, but not actually convert anything, just warn about
> it.
> 

I think this is the best option so far.  Since this doesn't exist I was just
writing a hook for myself which fails rather than warns when CRLFs are
detected.  Not modifying content by default is a good mantra.  But getting a
couple of CRLF files into the repository and then noticing n commits down
the line and having to run a filter-branch session is a pain.  So +1 for the
default being a warning (that includes appropriate instructions) when
committing a file that looks like text but has CRLF.  And having a "fail"
option might be nice while you(?)'re at it:

core.autocrlf = fail # refuse to commit text files containing CRLF

Greg. 

PS Of course none of this would have helped me with those old mac CR files
that got into another repository ...


-
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