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, 7 May 2010, hasen j wrote:

> On 7 May 2010 17:50, Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
> >> What if:
> >>
> >> - The entire history of the file is stored in CRLF
> >> - It's a windows-only file where the official "tool" that reads it
> >> barfs on LF line endings.
> >> - Third party tools also expect (or at least, handle) CRLF line endings.
> >
> > Umm. Then it's not text, is it? What you are describing is a binary file
> > that happens to look like text with CRLF.
> 
> That depends on your definition of text.

Well, my definition of text is "does it make sense to do any end-of-line 
conversions". That's the only definition that makes sense for an SCM, at 
least in the current context. If doing conversions on the line endings is 
wrong, then it's not text.

And your whole premise was that conversions were always wrong. So the way 
you put it, that's not a text-file, it's a binary file.

> Storing it with LF internally is ok, as long as we can have it
> *always* be checked out as crlf.

.. and that's what I suggested "core.crlf=on" would mean.

However, if you think that it needs to be CRLF on _all_ platforms, even 
platforms where CRLF is _wrong_ for a text-file, then see above: in that 
case it's not a text-file at all as far as the SCM is concerned.

In that case it's just a binary file, and CRLF is _not_ "end of text 
line", it's part of the definition of the format for that binary file.

			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]