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

Re: Problems with autoCRLF?

From
Junio C Hamano <junkio@cox.net>
Date
Mar 10, 2007, 01:24 UTC
Message-ID
<7v8xe528mk.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<1173464102.6102.18.camel@localhost>
Raimund Bauer <ray007@gmx.net> writes:
> Is it really intended that with a setting core.autoCRLF=true textfiles
> are checked out with crlf-lineendings on linux-boxes?

Yes. The implicit assumption with any setting to core.autoCRLF is that you want to keep the git objects free of CRLF line endings.

 - core.autoCRLF 'true' means that your tools that handle text
   files would be upset findign LF line endings, and they will
   leave text in CRLF line endings.  Checking out from git
   creates working tree files while adding CR before LF as
   needed, and checking in from working tree files to git strips
   CR before LF as needed.
 - core.autoCRLF 'input' means that your tools do not mind
   handling text files in LF line endings and they will leave
   text in CRLF line endings, so checking out from git creates
   working tree files by just giving what is stored in the
   repository, and checking in from working tree files to git
   strips CR before LF as needed.

So on sane platforms, you do not want to set that variable, unless you are helping to test and improve that feature.

Previous: Linus TorvaldsNext: Raimund Bauer
Message 4 of 5 in “Problems with autoCRLF?”
  1. Raimund BauerMar 9, 2007
  2. Robin RosenbergMar 9, 2007
  3. Linus TorvaldsMar 9, 2007
  4. Junio C HamanoMar 10, 2007
  5. Raimund BauerMar 10, 2007

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.