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

Re: Automatic core.autocrlf?

From
RDRobert Dailey <rcdailey.lists@gmail.com>
Date
Aug 30, 2018, 14:57 UTC
Message-ID
<CAHd499BCk4Q4oPY=CXK=YrUbNUbz4J_KoeQngfz=92Qfc6q=eA@mail.gmail.com>
In-Reply-To
<20180830045407.GB140348@aiede.svl.corp.google.com>
On Wed, Aug 29, 2018 at 11:54 PM Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 19 quoted lines
>
> Hi,
>
> Robert Dailey wrote:
>
> > Is there an 'auto' setting for the 'core.autocrlf' config? Reason I
> > ask is, I want that setting to be 'input' on linux but 'true' on
> > Windows.
>
> Others are exploring your question about the configuration language,
> but I want to emphasize some other ramifications.
>
> Why do we still have 'core.autocrlf'?  Do 'core.eol' and related
> settings take care of that need, or is autocrlf still needed?  If
> core.eol etc do not take care of this need, what should we do to get
> them to?
>
> Thanks, after having run into a few too many autocrlf-related messes,
> Jonathan

From my perspective, the confusion is due to the evolution of the feature. There's multiple ways to control EOL handling but most of it is legacy/backward compatibility, I think. core.autocrlf is a fall-back for repos that do not have a .gitattributes. Because .gitattributes is optional by design, I'm not sure if getting rid of the config options is a good idea. But your point did make me think about how `core.autocrlf = true` should probably be a system config default for the Git for Windows project. The default for that value should be platform-defined. That would make it automatically work the way I want, and might solve a lot of the issues where people are committing CRLF into repositories on Windows.

Previous: Jonathan NiederNext: Torsten Bögershausen
Message 10 of 15 in “Automatic core.autocrlf?”
  1. Robert DaileyAug 27, 2018
  2. Torsten BögershausenAug 27, 2018
  3. Duy NguyenAug 27, 2018
  4. Robert DaileyAug 27, 2018
  5. Andrei RybakAug 27, 2018
  6. Andrei RybakAug 27, 2018
  7. brian m. carlsonAug 28, 2018
  8. Robert DaileyAug 30, 2018
  9. Jonathan NiederAug 30, 2018
  10. Robert DaileyAug 30, 2018
  11. Torsten BögershausenAug 30, 2018
  12. Randall S. BeckerAug 30, 2018
  13. Jonathan NiederAug 31, 2018
  14. Randall S. BeckerAug 31, 2018
  15. Torsten BögershausenAug 31, 2018

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.