Re: [PATCH/RFC v2 1/4] Add "core.eolStyle" variable to control end-of-line conversion

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

 



On 9. mai 2010, at 20.11, Linus Torvalds wrote:

> On Sun, 9 May 2010, Eyvind Bernhardsen wrote:
>> 
>> I'm sorry.  Are you the same Linus Torvalds who wrote this:
>> 
>>> Btw, since we're discussing this, I do think that our current "crlf=input" 
>>> syntax for .gitattributes is pretty dubious.
> 
> Yes, it's dubious. But as with the kernel, we need to support backwards 
> compatibility for things that have reasonably been used (and "input" has).

Oh, absolutely.  I'm not suggesting removing support for it, I just don't think it's a good reason to keep the old naming alive.

> I really brought it up as an example of things that weren't necessarily 
> all that well designed.
> 
> That said, it looks like people actually do want per-file line-ending 
> settings, ie not just a global "I want CRLF vs LF". So it looks like 
> crlf=input is actually useful in a .gitattributes files, if only because 
> some people seem to want to mix CRLF and just LF in the same repository.
> 
> It also sounds like people actually want to have the reverse (ie not just 
> "input", but have a mode where LF may be the default, but then some 
> particular files must always be CRLF even if most files are normal text).

My plan was to "support" that by disabling conversion for those files; git wouldn't enforce the line endings, but at least it wouldn't break them.

I guess there's no reason not to have the option to enforce in there if there is a huge demand for that.

> So I suspect we want to really have support for all four combinations 
> _both_ in the .git/config file, _and_ in the .gitattributes file.
> 
> The four cases would be "none" ("binary" or "-crlf"), "lf" ("input" or 
> "crlf=input"), "system default", and "force crlf".

Well, "crlf=crlf" and "crlf=lf" would look silly, but no more than I could live with.  .gitconfig is already covered in my series.
-- 
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]