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

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

From
Eyvind Bernhardsen <eyvind.bernhardsen@gmail.com>
Date
May 9, 2010, 20:11 UTC
Message-ID
<06EEFAAE-31E7-4DAD-9FD3-D9809B16BCD9@gmail.com>
In-Reply-To
<alpine.LFD.2.00.1005091046570.3711@i5.linux-foundation.org>
On 9. mai 2010, at 20.11, Linus Torvalds wrote:
Show 9 quoted lines
> 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.
Show 11 quoted lines
> 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.
Show 5 quoted lines
> 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
Previous: Linus TorvaldsNext: Dmitry Potapov
Message 9 of 37 in “End-of-line normalization, take 2 (now only slightly scary)”
  1. 0/4 End-of-line normalization, take 2 (now only slightly scary)Eyvind Bernhardsen, May 8, 2010
  2. 1/4 Add "core.eolStyle" variable to control end-of-line conversionEyvind Bernhardsen, May 8, 2010
  3. Linus TorvaldsMay 8, 2010
  4. Eyvind BernhardsenMay 8, 2010
  5. Eyvind BernhardsenMay 8, 2010
  6. Linus TorvaldsMay 8, 2010
  7. Eyvind BernhardsenMay 9, 2010
  8. Linus TorvaldsMay 9, 2010
  9. Eyvind BernhardsenMay 9, 2010
  10. Dmitry PotapovMay 9, 2010
  11. hasen jMay 9, 2010
  12. Dmitry PotapovMay 10, 2010
  13. Eyvind BernhardsenMay 9, 2010
  14. Eyvind BernhardsenMay 9, 2010
  15. Robert BuckMay 9, 2010
  16. Eyvind BernhardsenMay 9, 2010
  17. Robert BuckMay 9, 2010
  18. Eyvind BernhardsenMay 10, 2010
  19. Robert BuckMay 10, 2010
  20. Robert BuckMay 10, 2010
  21. Dmitry PotapovMay 10, 2010
  22. Jay SoffianMay 9, 2010
  23. Jay SoffianMay 9, 2010
  24. Eyvind BernhardsenMay 10, 2010
  25. Junio C HamanoMay 9, 2010
  26. Finn Arne GangstadMay 9, 2010
  27. Junio C HamanoMay 9, 2010
  28. Eyvind BernhardsenMay 10, 2010
  29. Eyvind BernhardsenMay 9, 2010
  30. Finn Arne GangstadMay 9, 2010
  31. Dmitry PotapovMay 10, 2010
  32. Finn Arne GangstadMay 10, 2010
  33. Dmitry PotapovMay 10, 2010
  34. Finn Arne GangstadMay 9, 2010
  35. 2/4 Add tests for per-repository eol normalizationEyvind Bernhardsen, May 8, 2010
  36. 3/4 Pass eol conv mode as an argument instead of using global auto_crlfEyvind Bernhardsen, May 8, 2010
  37. 4/4 Add per-repository eol normalizationEyvind Bernhardsen, May 8, 2010

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.