Re: [PATCH/RFC 0/3] Per-repository end-of-line normalization

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

 



On 7. mai 2010, at 22.17, Linus Torvalds wrote:

> 
> 
> On Fri, 7 May 2010, Linus Torvalds wrote:
>> 
>> Now, the thing is, we can go for even simpler syntax still, by just making 
>> that ".gitconfig: core.autocrlf=true" entirely unnecessary. 
> 
> Exact semantics I'd suggest for 'core.autocrlf':
> 
>    Setting		path in .gitattributes	path _not_ in .gitattributes
>    =======		======================	===========================
> - not set at all	attribute value		no crlf
> - "off"/"false"	no crlf			no crlf
> - "on"			attribute value		autocrlf	
> - "input"		attribute "input"	autocrlf "input"
> 
> Which is different from what we do now for the "not set at all" case, 
> in that it still takes the .gitattributes value for those cases if a path 
> matches.
> 
> We could add a few core.autocrlf entries, like "force" (to force output to 
> be CRLF even on a platform where it isn't the default).

How can you say that this is simpler than my syntax?  I have an attribute that means "line endings should be normalised" and a configuration variable that decides what line endings should be used in the working directory for normalised files.  If you like CRLFs you set it to "crlf", if you like LFs you set it to "lf".

I'll replace "auto-eol" with something like "crlf=auto" because I actually think that's pretty neat, but I won't pretend that "true" and "input" are sane ways to indicate if you prefer CRLF or LF line endings in your working directory.
-- 
Eyvind

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