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

file name case-sensitivity issues

From
Alex Riesen <fork0@t-online.de>
Date
May 23, 2006, 21:06 UTC
Message-ID
<20060523210615.GB5869@steel.home>

Very simple to reproduce on FAT and NTFS, and under Windows, as usual, when a problem is especially annoying. I seem to have no chance to get my hands on this myself, so I at least let everyone know about the problem.

The case goes as follows:
  $ mkdir case-sensitivity-test
  $ cd case-sensitivity-test
  $ git init-db
  defaulting to local storage area
  $ echo foo > foo
  $ echo bar > bar
  $ git add foo bar
  $ git commit -m initial\ commit
  Committing initial tree 89ff1a2aefcbff0f09197f0fd8beeb19a7b6e51c
  $ git checkout -b side
  $ echo bar-side >> bar
  $ git commit -m side\ commit -o bar
  $ git checkout master
  $ rm foo
  $ git update-index --remove foo
  $ echo FOO > FOO # note case change
  $ git add FOO
# this is on linux, vfat  on an usbstick (mounted with default case
# conversion, which is "lower". That's why the file can't be found).
# Have no Windows at home. On Windows the FOO is created and "git add"
# just passes. We just assume it did add the file, as it would there.
  git-ls-files: error: pathspec 'FOO' did not match any.
  Maybe you misspelled it?
  $ git commit -m case\ change
  $ git pull . side
  Trying really trivial in-index merge...
  git-read-tree: fatal: Untracked working tree file 'foo' would be overwritten by merge.
  Nope. Really trivial in-index merge is not possible.
  Merging HEAD with 7b0cad3a104487fa92afa06736294338acb84281
  Merging:
  7f6a8ba3e41683ef5b55921d050092e766aad4a5 case change
  7b0cad3a104487fa92afa06736294338acb84281 side commit
  found 1 common ancestor(s):
  f857aaf5f1d3716d25ca7751f12de30420d9b2aa initial commit
  git-read-tree: git-read-tree: fatal: Untracked working tree file 'foo' would be overwritten by merge.
  No merge strategy handled the merge.
Well, what now?

What I did was to replace that die() with error() in read-tree.c:verify_absent, which if cause is not acceptable. I'll try to find a solution sometime later, but I really hope someone will find it sooner (because it'll take some time for me). Hope it didn't bit anyone yet...

Next: Linus Torvalds
Message 1 of 10 in “file name case-sensitivity issues”
  1. Alex RiesenMay 23, 2006
  2. Linus TorvaldsMay 23, 2006
  3. Linus TorvaldsMay 23, 2006
  4. Ben CliffordMay 23, 2006
  5. Junio C HamanoMay 24, 2006
  6. Ben CliffordMay 24, 2006
  7. Junio C HamanoMay 23, 2006
  8. Alex RiesenMay 25, 2006
  9. Junio C HamanoMay 25, 2006
  10. Christopher FaylorMay 26, 2006

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.