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

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

 



On Sat, May 08, 2010 at 02:54:35PM -0700, Linus Torvalds wrote:
> 
> 
> On Sun, 9 May 2010, Dmitry Potapov wrote:
> >
> > explanation could be easily avoided by renaming 'crlf' as 'eol'.
> 
> What the heck is wrong with people?
> 
> > Now, if you look at this:
> > 
> >       *.sln -eol
> >       *.jpg -eol
> >       *.txt eol
> >       *.[ch] eol
> 
> Right. Look at it. It's totally incomprehensible. It's _worse_ than "crlf" 
> as a name.
> 
> What the f*ck does "jpg" have to do with "eol"? Nothing.

Right, nothing, in other words, no eol conversion... and "-eol" seems to
express this idea well. So, I don't see why it is worse than "crlf"...

Personally, I do not care whether it is "crlf", or "eol", but a lot of
people that I know were confused by crlf, because they thought that it
means that this file is stored with crlf, while this attribute actually
means that file needs eol conversion.

> 
> You could talk about "binary" vs "text", and it would make sense, but your 
> argument that "eol" is somehow better than "crlf" is just insane.
> 
> So I could certainly see
> 
> 	*.jpg binary
> 	*.txt text
> 
> making sense. But "eol" is certainly no better than "crlf". 

What about .sln files? They are xml files with CRLF ending. Does it mean
they are binary? Based on how it is stored, it is certainly binary, but
when it comes to "diff" or even "merge" you may want to think about them
as text, and, in general, people tend to think about them as text files.

Another example is shell scripts. You really want them to be LF even on
Windows. So, is it a binary file too?

So, this approach is not so intuitive as it may appear if you consider
only .jpg and .txt.

> 
> In the end, crlf is what we have. We're not getting rid of it, so if 
> somebody were to actually rename it, that would just mean that there are 
> _two_ different ways to say the same thing. And quite frankly, I think 
> that's worse than what we have now, so I don't think it's worth it.

I was not sure myself that the idea of renaming worth it... While I do
think that "eol" is a better name than "crlf", but not by big margin,
and as you said crlf is what we have now... so be it...


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