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

Re: autocrlf

From
Johannes Sixt <j.sixt@eudaptics.com>
Date
May 18, 2007, 11:45 UTC
Message-ID
<464D91E7.FB3F9B4@eudaptics.com>
In-Reply-To
<200705181111.53823.andyparkins@gmail.com>
Andy Parkins wrote:
Show 7 quoted lines
> What I had imagined was that I could use .gitattributes to tell git which
> files in my tree were text.  Then the line endings on checkout would be set
> as appropriate to my platform, and on check in set to LF.
> 
> What actually happens is that any file with the crlf attribute is being
> checked out with LF expanded to CRLF (I'm running Linux of course), which is
> completely not what I wanted.

If I understand the documentation correctly (Documentation/gitattributes.txt) then you set core.autocrlf to true on Windows and false everywhere else, and things should start working like you imagined.

I have not checked whether the behavior is according to the documentation, though.

-- Hannes
Previous: Andy ParkinsNext: Andy Parkins
Message 4 of 5 in “autocrlf”
  1. Andy ParkinsMay 18, 2007
  2. Raimund BauerMay 18, 2007
  3. Andy ParkinsMay 18, 2007
  4. Johannes SixtMay 18, 2007
  5. Andy ParkinsMay 18, 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.