Re: CRLF problems with Git on Win32

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

 




On Thu, 10 Jan 2008, Gregory Jefferis wrote:
> 
> So this is what has to be accommodated.  But instead of having autocrlf
> always set on Windows and always converting to LF in the repository, why not
> do nothing by default [ .. ]

Why? You can screw yourself more, and much more easily (and much more 
subtly), by leaving CRLF alone on Windows.

The thing is, 99.9% of all people will be *much* better off with 
autocrlf=true on Windows than with it defaulting to off (or even fail).

Isn't *that* the whole point of having a default? Pick the thing that is 
the right thing for almost everybody?

And no, "but think of the children.." is not a valid argument. Sure, you 
*can* corrupt binary imags with CRLF conversion. But it's really quite 
hard, since the git heuristics for guessing are rather good. You really 
have to work at it, and if you do, you're pretty damn likely to know about 
the issue, so that 0.1% that really needs to not convert (and it's usually 
one specific file type!) would probably not even turn off CRLF, but rather 
add a .gitattributes entry for that one filetype!

(Side note: if there are known filetype extensions that have problems with 
the git guessing, we sure as heck could take the filename into account 
when guessing! There's absolutely nothing that says that we only have to 
look at the contents when guessing about the text/binary thing!)

			Linus
-
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