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:18 UTC
Message-ID
<alpine.LFD.1.00.0801111313220.3148@woody.linux-foundation.org>
In-Reply-To
<579DF776-4F4E-464C-88DB-B22C2EC291BD@sb.org>
On Fri, 11 Jan 2008, Kevin Ballard wrote:
Show 8 quoted lines
>
> Anyway, here's the state of my directory:
> 
> kevin@KBALLARD:~/Documents/School/C07> git ls-tree HEAD
> 040000 tree b47c8103e2e01fcf145bdc237c0e56ffc61f1c47	CS4536
> 040000 tree dbf7fc51ef3effebdf9b4e9172e4c86cae52b163	cs4536
> 040000 tree 15834a7b6534a285bf6930be4e5404b37e1dc718	ece3601
> 040000 tree 62d229b8c4a389b550df20a3752d666c48c767a4	ma2071
Hmm. You can do something like
	git ls-files CS4536 | xargs git update-index --force-remove

which will remove gits knowledge of that directory even though "lstat()" will still claim that all the files still exists.

Case-insensitive filesystems are a pain.

I wish we had some way to handle it sanely, but I don't think a sane solution to case-insensitivity exists. If you limit it to strictly just 7bit ascii names (like in your example), then some of the problems do go away, but it would still be probably fairly major surgery to try to teach git about the whole insanity of a case-independent working tree.

		Linus
Previous: Robin RosenbergNext: Johannes Schindelin
Message 6 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.