Re: core.autocrlf & Cygwin - files incorrectly flagged as modified
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