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

Re: [RFC/PATCH v3 4/5] Rename "crlf" attribute as "eolconv"

From
Jonathan Nieder <jrnieder@gmail.com>
Date
May 14, 2010, 04:56 UTC
Message-ID
<20100514045646.GA2433@progeny.tock>
In-Reply-To
<AANLkTil1i_vFAvT1CotYdK47LnufVKc17-1168rOVcMX@mail.gmail.com>
Hi Bob,
Robert Buck wrote:
Show 6 quoted lines
> *   text
> *.foo  binary
> 
> means autoconvert everything regardless of the autocrlf setting,
> except for .foo files ? So now we can dispense with the autocrlf
> attribute altogether if we so wish?

If I understand correctly, there is no autocrlf attribute, just a configuration item. If you put

 * crlf
 *.foo -crlf
in your .gitattributes with current git, this means:
 - if the '[core] autocrlf' configuration is not set, do not convert
   anything;
 - otherwise, convert everything except for .foo files
Eyvind’s series improves that in a few ways.
 - [from Finn Arne Gangstad] If the in-repository copy of a file
   contains any carriage returns, do not try to convert it.  This
   makes it easier to deal with mistakes.
 - For files with crlf enabled through attributes, always convert,
   whether '[core] autocrlf' is enabled or not.
 - Use the '[core] autocrlf' setting to determine the desired
   line-ending for checked-out files (\r\n if true, \n otherwise).
   A new eol attribute is provided to override that setting.
 - The crlf attribute gets a new synonym "text" to avoid confusion.

There is also some change to the result of file type autodetection, but as long as your .gitattributes uses '* crlf' or '* -crlf', there is no need to worry about this.

Hope that helps, Jonathan

Previous: Robert BuckNext: Eyvind Bernhardsen
Message 20 of 27 in “End-of-line normalization, redesigned”
  1. 0/5 End-of-line normalization, redesignedEyvind Bernhardsen, May 12, 2010
  2. 1/5 autocrlf: Make it work also for un-normalized repositoriesEyvind Bernhardsen, May 12, 2010
  3. 2/5 Add tests for per-repository eol normalizationEyvind Bernhardsen, May 12, 2010
  4. 3/5 Add per-repository eol normalizationEyvind Bernhardsen, May 12, 2010
  5. 4/5 Rename "crlf" attribute as "eolconv"Eyvind Bernhardsen, May 12, 2010
  6. Linus TorvaldsMay 13, 2010
  7. Robert BuckMay 13, 2010
  8. Robert BuckMay 13, 2010
  9. Eyvind BernhardsenMay 13, 2010
  10. Robert BuckMay 13, 2010
  11. utf8 BOMDmitry Potapov, May 14, 2010
  12. Eyvind BernhardsenMay 15, 2010
  13. Dmitry PotapovMay 16, 2010
  14. Eyvind BernhardsenMay 16, 2010
  15. TaitMay 16, 2010
  16. Dmitry PotapovMay 16, 2010
  17. Eyvind BernhardsenMay 13, 2010
  18. Linus TorvaldsMay 13, 2010
  19. Robert BuckMay 14, 2010
  20. Jonathan NiederMay 14, 2010
  21. Eyvind BernhardsenMay 14, 2010
  22. Eyvind BernhardsenMay 14, 2010
  23. Eyvind BernhardsenMay 14, 2010
  24. Linus TorvaldsMay 14, 2010
  25. Add "core.eol" variable to control end-of-line conversionEyvind Bernhardsen, May 15, 2010
  26. Robert BuckMay 16, 2010
  27. 5/5 Rename "core.autocrlf" config variable as "core.eolconv"Eyvind Bernhardsen, May 12, 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.