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

Re: Re-casing directories on case-insensitive systems

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Jan 11, 2008, 21:25 UTC
Message-ID
<alpine.LFD.1.00.0801111318570.3148@woody.linux-foundation.org>
In-Reply-To
<CCDF6298-4F17-4F70-AF00-E63F2C2A2816@sb.org>
On Fri, 11 Jan 2008, Kevin Ballard wrote:
Show 6 quoted lines
>
> Wow, it's even worse. I made a tmp branch and used git-filter-branch to remove
> the commit that introduced CS4536, leaving only the cs4536 directory. But now
> if I try and run `git co master` it refuses, as it thinks it's going to
> overwrite the untracked file CS4536/introduction.txt. I believe it's actually
> seeing the tracked file cs4536/introduction.txt.

If you don't have any dirty state, I'd suggest removing your working tree before doing a "git checkout". That's needed anyway to make sure that your working tree has the same case as your index and git trees, because otherwise since the crazy filesystem thinks that CS4536/cs4536 ar ethe same, you might end up having all the wrong names.

Case differences are hard anyway, but you probably made them even harder by them using a rename that actually meant that the old name still *existed* in the filesystem (since the new name would always map to the old name thanks to your crazy filesystem).

I'm sure you can get into even more trouble with case-independent filesystems, but I think you did a pretty good job of hitting on one of the craziest cases ;)

		Linus
Previous: Kevin BallardNext: Robin Rosenberg
Message 4 of 29 in “Re-casing directories on case-insensitive systems”
  1. Kevin BallardJan 11, 2008
  2. Kevin BallardJan 11, 2008
  3. Kevin BallardJan 11, 2008
  4. Linus TorvaldsJan 11, 2008
  5. Robin RosenbergJan 11, 2008
  6. Linus TorvaldsJan 11, 2008
  7. Johannes SchindelinJan 11, 2008
  8. Kevin BallardJan 11, 2008
  9. Johannes SchindelinJan 11, 2008
  10. Linus TorvaldsJan 11, 2008
  11. David KastrupJan 11, 2008
  12. Kevin BallardJan 11, 2008
  13. Robin RosenbergJan 11, 2008
  14. Kevin BallardJan 12, 2008
  15. Robin RosenbergJan 12, 2008
  16. Kevin BallardJan 12, 2008
  17. Junio C HamanoJan 12, 2008
  18. Johannes SchindelinJan 12, 2008
  19. Kevin BallardJan 12, 2008
  20. Junio C HamanoJan 12, 2008
  21. Kevin BallardJan 12, 2008
  22. David KastrupJan 12, 2008
  23. Dmitry PotapovJan 12, 2008
  24. Junio C HamanoJan 12, 2008
  25. Robin RosenbergJan 12, 2008
  26. Johannes SchindelinJan 12, 2008
  27. Dmitry PotapovJan 12, 2008
  28. Linus TorvaldsJan 12, 2008
  29. Dmitry PotapovJan 12, 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.