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

EOL strangeness

From
GSGraham Sanderson <graham.sanderson@gmail.com>
Date
Jan 17, 2011, 19:56 UTC
Message-ID
<AANLkTiknxMh_OophKWsqkYO2C+PsfF0ZnNXKLbheM4wF@mail.gmail.com>
Apologies if someone has answered this before:

So we have moved some big teams over to git (awesome thx), and have been using the msysgit default core.autocrlf=true on Windows, and making sure text files are LF on other platforms

However we do continue to have a few problems with people storing CRLF in the repository (partly because of lack of understanding, and partly it seems because of eGit on windows which ignores core.autocrlf).

Anyway, this much is all fine, and we can fix; what I don't understand is why for files stored as CRLF in the repository it seems indeterminate when or if they show up locally modified (on my window box with core.autocrlf = true) when I pull them from the repository. I assume the idea is that that they "would be" modified if I were to check them in, since they would be converted to LF, however this only happens sometimes and for a seemingly random subset of the files stored incorrectly.

It also seems to depend on the state of the local index, as recreating the local index often changes the set of files that are displayed this way (even without any changes to the files), and it also seems to be different on different machines (perhaps based on when they happened to pull code).

If anyone can give me a quick mental picture of how this is supposed to work (i.e. at what time the eol conversions are considered) then that'd be great... otherwise I guess I'll go dig in the code.

Thanks,
Graham.
Next: René Scharfe
Message 1 of 3 in “EOL strangeness”
  1. Graham SandersonJan 17, 2011
  2. René ScharfeJan 20, 2011
  3. Graham SandersonJan 20, 2011

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.