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 18, 2009, 06:06 UTC
Message-ID
<200912180706.46455.robin.rosenberg@dewire.com>
In-Reply-To
<loom.20091218T033941-445@post.gmane.org>
fredagen den 18 december 2009 03.43.05 skrev  David Antliff:
Show 20 quoted lines
> Robin Rosenberg writes:
> > tisdag 15 december 2009 23:24:15 skrev  David Antliff:
> > > 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.
> 
> Oh? That could very well be true - how would such line endings get into a
>  blob? I'm pretty sure everyone is using autocrlf=true which should convert
>  all line endings to LF on commit, but perhaps there's another way to get
>  CRLF line endings into a blob?
> 
> If autocrlf=false, files are committed as-is (I believe), so this would be
>  one way to end up committing such files. But as far as I know, nobody has
>  turned that option off in our group.

EGit works this way at the moment. Conversion tools might do this. Some Eclipse plugins produce files with CRLF regardless on platform and on non-Windows the core.autocrlf flags is false by default.

-- robin
Previous: David Antliff
Message 6 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.