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

Re: core.autocrlf & Cygwin - files incorrectly flagged as modified

From
Robin Rosenberg <robin.rosenberg@dewire.com>
Date
Dec 17, 2009, 07:00 UTC
Message-ID
<200912170800.35752.robin.rosenberg@dewire.com>
In-Reply-To
<loom.20091215T225528-115@post.gmane.org>
tisdag 15 december 2009 23:24:15 skrev  David Antliff:
Show 21 quoted lines
> I approached the Cygwin mailing list about this problem, and the package
> maintainer suggested I ask here as well, in case someone can shed some
>  light on this.
> 
> I am using git-1.6.4.2 (as part of Cygwin-1.7 beta) and I've observed some
> behaviour that seems wrong to me.
> 
> When we deployed git on Cygwin, we decided to set core.autocrlf=true, as
>  many of our users are working with DOS/Windows files (CRLF endings). Some
>  users are using Linux and working on the same code. I'm not actually sure
>  why we chose to use this setting - there's a lot of conflicting advice
>  around. I think the final decision was made so that kdiff3 would operate
>  correctly. However we did go to lengths to ensure that everyone is using
>  the same configuration setting.
> 
> The problem is that sometimes, after a git-clone, the output of git-status
>  and git-diff shows entire files as being different. However these files
>  have not been modified by the user - only git has had a chance to change
>  them (due to autocrlf=true). But surely if git has converted the file
>  automatically, it should know that it has to compensate for this when
>  comparing with the local repository?
AFAIK, this happens if you have CRLF line endings in the blobs in the repo.
-- robin
Previous: David AntliffNext: David Antliff
Message 4 of 6 in “core.autocrlf & Cygwin - files incorrectly flagged as modified”
  1. David AntliffDec 15, 2009
  2. Tay Ray ChuanDec 17, 2009
  3. David AntliffDec 17, 2009
  4. Robin RosenbergDec 17, 2009
  5. David AntliffDec 18, 2009
  6. Robin RosenbergDec 18, 2009

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.