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

git filter-branch can "forget" directories on case insensitive filesystems

From
Simeon Maxein <smaxein@googlemail.com>
Date
Sep 3, 2010, 16:36 UTC
Message-ID
<AANLkTimOs9m==KaD3BNHcgkTTqNQF1yV0NLA_Ew+iS-N@mail.gmail.com>

When running git filter-branch on a case insensitive filesystem, the working tree checked out for filtering is missing a directory in my project. This is probably related to the problem discussed here: http://article.gmane.org/gmane.comp.version-control.git/154662

In contrast to that report, this one affects repositories on case-insensitive filesystems, regardless of the setting of core.ignorecase.

To reproduce the problem, follow the steps below. I tested them with git 1.7.0.4 on a laptop running Ubuntu, with the repository on a Fat32 USB drive.

mkdir gittest cd gittest git init mkdir testdir echo 'abc' >testdir/testfile git add testdir git commit -m foo git rm -r testdir mkdir testDir echo 'abc' >testDir/testfile git add testDir git commit -m bar

Now, check out master^1 and master to ensure the commits look as expected. Then, run this:

git filter-branch --tree-filter 'ls' master
You will notice that the directory vanishes when the second commit is filtered.

The problem occurs whether core.ignorecase is set to true or false. It doesn't occur on case sensitive filesystems.

Simeon
Next: Simeon Maxein
Message 1 of 7 in “git filter-branch can "forget" directories on case insensitive filesystems”
  1. Simeon MaxeinSep 3, 2010
  2. Simeon MaxeinJan 25, 2011
  3. Johannes SixtJan 25, 2011
  4. Simeon MaxeinJan 25, 2011
  5. Erik Faye-LundJan 25, 2011
  6. Simeon MaxeinJan 26, 2011
  7. Erik Faye-LundJan 26, 2011

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.