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

Re: crlf with git-svn driving me nuts...

From
Nigel Magnay <nigel.magnay@gmail.com>
Date
Apr 16, 2008, 21:56 UTC
Message-ID
<320075ff0804161456h1a6fd4e8qdd185f4540a1259a@mail.gmail.com>
In-Reply-To
<20080416203923.GH3133@dpotapov.dyndns.org>
Show 9 quoted lines
>  > Nigel's example showed a few situations where git *thought* the file
>  > had changed when it hadn't, and yet is incapable of checking in the
>  > changes.
>
>  Incapable of checking in? I have not found a single example in
>  his mail where it was impossible. The only quirk with autocrlf
>  is that you need to re-checkout your work tree after changing
>  it. There is no other problems with it as far as I know.
>

My (initial) setting of core.autocrlf to false was because that's what it was on all the windows clients (I know the default has now changed) and to make the later parts of the script obvious that the file in the repo had a CRLF ending, rather than have being converted to LF. That's the situation we have, because they've all come from SVN.

The bit I really don't understand is why git thinks a file that has just been touched has chnaged when it hasn't, and doing a 'git reset --hard' actually doesn't help at all (but, bizzarely, git config core.autocrlf false & git config core.autocrlf true *does* !). The repo copy is CRLF, the working copy is CRLF, but git thinks it's changed...

Previous: Dmitry PotapovNext: Martin Langhoff
Message 5 of 19 in “crlf with git-svn driving me nuts...”
  1. Nigel MagnayApr 16, 2008
  2. Dmitry PotapovApr 16, 2008
  3. Avery PennarunApr 16, 2008
  4. Dmitry PotapovApr 16, 2008
  5. Nigel MagnayApr 16, 2008
  6. Martin LanghoffApr 16, 2008
  7. Avery PennarunApr 16, 2008
  8. Dmitry PotapovApr 16, 2008
  9. Avery PennarunApr 16, 2008
  10. Nigel MagnayApr 16, 2008
  11. Dmitry PotapovApr 17, 2008
  12. Avery PennarunApr 17, 2008
  13. Nigel MagnayApr 17, 2008
  14. Dmitry PotapovApr 17, 2008
  15. Nigel MagnayApr 17, 2008
  16. Dmitry PotapovApr 17, 2008
  17. Nigel MagnayApr 17, 2008
  18. Dmitry PotapovApr 17, 2008
  19. Steffen ProhaskaApr 17, 2008

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.