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

Re: core.autocrlf considered half-assed

From
Dmitry Potapov <dpotapov@gmail.com>
Date
Mar 9, 2010, 10:11 UTC
Message-ID
<20100309101101.GJ31105@dpotapov.dyndns.org>
In-Reply-To
<alpine.DEB.1.00.1003091028440.7596@pacific.mpi-cbg.de>
On Tue, Mar 09, 2010 at 10:29:20AM +0100, Johannes Schindelin wrote:
> 
> That is just papering over the real culprit: Git checks something out. 
> This should be clean. But then Git says it is not.

We have two filters: from-git-to-worktree and from-worktree-to-git. If those conversions are inconsistent for whatever reason, it is not going to be well even if we found a way to solve this not-being-clean-after- checkout problem.

One possible approach is to mark all files that had CRLF conversion during checkout and apply the opposite conversion only to them. But what about newly added files? Wouldn't this lead that to the situation where newly added files will have the incorrect ending?

IMHO, this not clean after checkout repo demonstrates that you have the incorrectly crlf configuration in it. So, you probably should correct .gitattributes (or even to disable autocrlf in it if this repository is not intended to be used with autocrlf=true). Either way, your current settings are incorrect. It is better to fix it than try to hide it!

Dmitry
Previous: Johannes Schindelin
Message 12 of 12 in “core.autocrlf considered half-assed”
  1. Johannes SchindelinMar 5, 2010
  2. Dmitry PotapovMar 7, 2010
  3. Linus TorvaldsMar 7, 2010
  4. TaitMar 8, 2010
  5. Johannes SchindelinMar 8, 2010
  6. Junio C HamanoMar 8, 2010
  7. Johannes SchindelinMar 9, 2010
  8. Junio C HamanoMar 9, 2010
  9. Johannes SchindelinMar 8, 2010
  10. Dmitry PotapovMar 9, 2010
  11. Johannes SchindelinMar 9, 2010
  12. Dmitry PotapovMar 9, 2010

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.