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

Re: [PATCH 0/7] Case-insensitive filesystem support, take 1

From
Dmitry Potapov <dpotapov@gmail.com>
Date
Mar 26, 2008, 02:46 UTC
Message-ID
<20080326024609.GL25381@dpotapov.dyndns.org>
In-Reply-To
<alpine.LFD.1.00.0803251347400.2775@woody.linux-foundation.org>
On Tue, Mar 25, 2008 at 02:04:58PM -0700, Linus Torvalds wrote:
Show 5 quoted lines
> 
> IOW, all my case-insensitivity checking was very much designed to be about 
> the working tree, not about git internal representations. Put another way, 
> they should really only affect code that does "lstat()" to check whether 
> a file exists or code that does "open()" to open/create a file.

Of course, case-insensitivity is about the working tree only. But when I merge another branch to the current one, git normally checks that it is not going to overwrite existing files in the *work tree* and refuses to do the merge if some files may be overwritten.

So if I work on a case-insensitive filesystem and have a file in a different case and core.ignorecase=false, then the merge fails as expected!

But core.ignorecase=true, which is supposed to do a better job for case- insensitive filesystems, actually causes the problem here.

Here is my test script:

==== mkdir git-test cd git-test git init git config core.ignorecase true echo foo > foo git add foo git commit -m 'initial commit'

git checkout -b other

echo file > file git add file git commit -m 'add file'

git checkout master echo File > File git add File git commit -m 'add File'

# I expect merge to fail here... and it does fail if core.ignorecase # is set to false, but with core.ignorecase = true, git will overwrite # 'File'. # git config core.ignorecase false git merge other ===

Dmitry
Previous: Linus TorvaldsNext: Linus Torvalds
Message 26 of 29 in “Case-insensitive filesystem support, take 1”
  1. 0/7 Case-insensitive filesystem support, take 1Linus Torvalds, Mar 22, 2008
  2. 1/7 Make unpack_trees_options bit flags actual bitfieldsLinus Torvalds, Mar 22, 2008
  3. 2/7 Move name hashing functions into a file of its ownLinus Torvalds, Mar 22, 2008
  4. 3/7 Make "index_name_exists()" return the cache_entry it foundLinus Torvalds, Mar 22, 2008
  5. 4/7 Make hash_name_lookup able to do case-independent lookupsLinus Torvalds, Mar 22, 2008
  6. 5/7 Add 'core.ignorecase' optionLinus Torvalds, Mar 22, 2008
  7. 6/7 Make branch merging aware of underlying case-insensitive filsystemsLinus Torvalds, Mar 22, 2008
  8. 7/7 Make unpack-tree update removed files before any updated filesLinus Torvalds, Mar 22, 2008
  9. 0/7 Final wordsLinus Torvalds, Mar 22, 2008
  10. Linus TorvaldsMar 22, 2008
  11. 8/7 When adding files to the index, add support for case-independent matchesLinus Torvalds, Mar 22, 2008
  12. 9/7 Make git-add behave more sensibly in a case-insensitive environmentLinus Torvalds, Mar 22, 2008
  13. Junio C HamanoMar 23, 2008
  14. Junio C HamanoMar 23, 2008
  15. Linus TorvaldsMar 23, 2008
  16. Johannes SchindelinMar 22, 2008
  17. Linus TorvaldsMar 22, 2008
  18. Johannes SchindelinMar 22, 2008
  19. t0050: Set core.ignorecase case to activate case insensitivitySteffen Prohaska, Mar 22, 2008
  20. git-init: autodetect core.ignorecaseDmitry Potapov, Mar 25, 2008
  21. Johannes SchindelinMar 25, 2008
  22. git-init: autodetect core.ignorecaseDmitry Potapov, Mar 25, 2008
  23. Dmitry PotapovMar 25, 2008
  24. Dmitry PotapovMar 25, 2008
  25. Linus TorvaldsMar 25, 2008
  26. Dmitry PotapovMar 26, 2008
  27. Linus TorvaldsMar 26, 2008
  28. Derek FawcusMar 25, 2008
  29. Jan HudecMar 25, 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.