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

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

 



On Fri, May 7, 2010 at 3:45 PM, Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
> On Fri, 7 May 2010, Avery Pennarun wrote:
>> 1) Whether a project has files that should be EOL-converted
>> automatically (we seem to all agree that this is set in
>> .gitattributes, whichever attribute is used).
>>
>> 2) Whether a particular person wants those particular files to be
>> EOL-converted, and what to convert them to.
>
> So? If we were to have a .gitconfig file, then both of those things would
> just work.

No!  The whole point is that each user *does* still want to be able to
decide how to convert the files tagged by the crlf gitattribute (or a
new attribute, I don't care).  Setting this in a .gitconfig file
inside the project is pointless; I need it in my *personal* config.
msysgit users want to set it globally to CRLF by default, Linux or
cygwin users probably want to set it to LF by default.

So #1 is useful to have in the repo, #2 is not.

I am a real live example of this.  For our Delphi projects at work, I
want to check it out with LF on my Linux machine (so I can
patch/diff/merge/grep/edit/etc easily), and CRLF on my Windows machine
(so that the Delphi IDE doesn't get confused).  Other projects I want
to have pure LF on both Linux and Windows, so setting
core.autocrlf=true globally will break things.

Eyvind's proposal (or a similar proposal where his new attribute is
just the crlf attribute) will get me and all my co-workers the
wonderful correct behaviour *by default*; the current behaviour, or an
in-repo .gitconfig, will not.  The key feature is the new
core.eolStyle option, not whether or not we add a new attribute.

> That said, I don't think the extra .gitconfig is even worth it, the same
> way I do _not_ think Eyvind's extra .gitattributes things are worth it.

Do you even use any CRLF projects?  If not, then presumably none of
the options will seem worth it. :)

But the current behaviour really doesn't work for people who need CRLF
conversion, and an in-repo .gitconfig file won't help them.
core.eolStyle + a change to crlf attribute semantics will.

Have fun,

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