git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: CRLF, LF ... CR ?

From
David Aguilar <davvid@gmail.com>
Date
Sep 26, 2012, 08:42 UTC
Message-ID
<CAJDDKr7Y5iXVxDHPJ+HQ86T43YBccnsEsebFje9pZzEBgh3=9A@mail.gmail.com>
In-Reply-To
<7vtxv18ax2.fsf@alter.siamese.dyndns.org>
On Thu, Sep 13, 2012 at 9:51 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 9 quoted lines
> David Aguilar <davvid@gmail.com> writes:
>
>> git doesn't really even support LF.
>
> At the storage level that is correct, but the above is a bit of
> stretch.  It may not be "support", but git _does_ rely on LF when
> running many text oriented operations (a rough rule of thumb is
> "does 'a line' in a file matter to the operation?").  Think about
> "git diff" and "git blame".
Thanks for the thorough explanation.  You're 100% correct, as always.

I'll be honest: I had a small bias when responding. I didn't want anyone to think a "autocr" feature would be useful, so I played the "git is really simple" angle hoping it would put a kabosh on the idea. That was a little silly of me.

That said, perhaps the "autocrlf" code is simple enough that it could be easily tweaked to also handle this special case, but I am not familiar with the code enough to say. My gut feeling was that it was too narrow a use case. I guess if someone[*] wanted to whip up a patch then it would be a different story, but it doesn't seem to be the itch of anyone around here so far.

[*] Jens, that could be you ;-)
cheers,
-- 
David
Previous: Junio C HamanoNext: Jens Bauer
Message 14 of 18 in “CRLF, LF ... CR ?”
  1. Jens BauerSep 13, 2012
  2. Drew NorthupSep 13, 2012
  3. Jeff KingSep 13, 2012
  4. Jens BauerSep 13, 2012
  5. Jens BauerSep 13, 2012
  6. Jeff KingSep 13, 2012
  7. Jens BauerSep 13, 2012
  8. Johannes SixtSep 13, 2012
  9. Jens BauerSep 13, 2012
  10. Erik Faye-LundSep 13, 2012
  11. David AguilarSep 14, 2012
  12. Jens BauerSep 14, 2012
  13. Junio C HamanoSep 14, 2012
  14. David AguilarSep 26, 2012
  15. Jens BauerSep 26, 2012
  16. Jens BauerSep 26, 2012
  17. Junio C HamanoSep 27, 2012
  18. Jens BauerSep 27, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.