{"thread":{"id":"24958","subject":"git filter-branch can \"forget\" directories on case insensitive filesystems","startedAt":"2010-09-03T16:36:17Z","lastAt":"2011-01-26T00:58:09Z","messageCount":7,"participants":["Simeon Maxein","Johannes Sixt","Erik Faye-Lund"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"149763","messageId":"AANLkTimOs9m==KaD3BNHcgkTTqNQF1yV0NLA_Ew+iS-N@mail.gmail.com","threadId":"24958","inReplyTo":null,"subject":"git filter-branch can \"forget\" directories on case insensitive filesystems","fromName":"Simeon Maxein","fromEmail":"smaxein@googlemail.com","sentAt":"2010-09-03T16:36:17Z","receivedAt":"2010-09-03T16:36:17Z","isPatch":false,"sender":{"key":"smaxein@googlemail.com","avatar":"https://gravatar.com/avatar/f85c8c10abdc691c40249ebff4df1d31d57fa71e957154bf92f7058280d7208b?d=mp&s=160"},"body":"When running git filter-branch on a case insensitive filesystem, the\nworking tree checked out for filtering is missing a directory in my\nproject. This is probably related to the problem discussed here:\nhttp://article.gmane.org/gmane.comp.version-control.git/154662\n\nIn contrast to that report, this one affects repositories on\ncase-insensitive filesystems, regardless of the setting of\ncore.ignorecase.\n\nTo reproduce the problem, follow the steps below. I tested them with\ngit 1.7.0.4 on a laptop running Ubuntu, with the repository on a Fat32\nUSB drive.\n\nmkdir gittest\ncd gittest\ngit init\nmkdir testdir\necho 'abc' >testdir/testfile\ngit add testdir\ngit commit -m foo\ngit rm -r testdir\nmkdir testDir\necho 'abc' >testDir/testfile\ngit add testDir\ngit commit -m bar\n\nNow, check out master^1 and master to ensure the commits look as\nexpected. Then, run this:\n\ngit filter-branch --tree-filter 'ls' master\n\nYou will notice that the directory vanishes when the second commit is filtered.\n\nThe problem occurs whether core.ignorecase is set to true or false. It\ndoesn't occur on case sensitive filesystems.\n\nSimeon\n"},{"id":"159855","messageId":"4D3F38E9.9060902@googlemail.com","threadId":"24958","inReplyTo":"AANLkTimOs9m==KaD3BNHcgkTTqNQF1yV0NLA_Ew+iS-N@mail.gmail.com","subject":"Re: git filter-branch can \"forget\" directories on case insensitive filesystems","fromName":"Simeon Maxein","fromEmail":"smaxein@googlemail.com","sentAt":"2011-01-25T20:56:09Z","receivedAt":"2011-01-25T20:56:09Z","isPatch":false,"sender":{"key":"smaxein@googlemail.com","avatar":"https://gravatar.com/avatar/f85c8c10abdc691c40249ebff4df1d31d57fa71e957154bf92f7058280d7208b?d=mp&s=160"},"body":"In my opinion this is a quite serious issue, because files are lost\nwithout any indication to the user. As of git 1.7.3.1 (tested on\nWindows/NTFS with msysGit this time), the problem still exists. Please\ngive it a look. Fullquote of the problem description / steps to\nreproduce follows.\n\nSimeon\n> When running git filter-branch on a case insensitive filesystem, the\n> working tree checked out for filtering is missing a directory in my\n> project. This is probably related to the problem discussed here:\n> http://article.gmane.org/gmane.comp.version-control.git/154662\n>\n> In contrast to that report, this one affects repositories on\n> case-insensitive filesystems, regardless of the setting of\n> core.ignorecase.\n>\n> To reproduce the problem, follow the steps below. I tested them with\n> git 1.7.0.4 on a laptop running Ubuntu, with the repository on a Fat32\n> USB drive.\n>\n> mkdir gittest\n> cd gittest\n> git init\n> mkdir testdir\n> echo 'abc' >testdir/testfile\n> git add testdir\n> git commit -m foo\n> git rm -r testdir\n> mkdir testDir\n> echo 'abc' >testDir/testfile\n> git add testDir\n> git commit -m bar\n>\n> Now, check out master^1 and master to ensure the commits look as\n> expected. Then, run this:\n>\n> git filter-branch --tree-filter 'ls' master\n>\n> You will notice that the directory vanishes when the second commit is filtered.\n>\n> The problem occurs whether core.ignorecase is set to true or false. It\n> doesn't occur on case sensitive filesystems.\n>\n> Simeon\n"},{"id":"159856","messageId":"201101252256.03644.j6t@kdbg.org","threadId":"24958","inReplyTo":"4D3F38E9.9060902@googlemail.com","subject":"Re: git filter-branch can \"forget\" directories on case insensitive filesystems","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2011-01-25T21:56:03Z","receivedAt":"2011-01-25T21:56:03Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"On Dienstag, 25. Januar 2011, Simeon Maxein wrote:\n> In my opinion this is a quite serious issue, because files are lost\n> without any indication to the user. As of git 1.7.3.1 (tested on\n> Windows/NTFS with msysGit this time), the problem still exists. Please\n> give it a look. Fullquote of the problem description / steps to\n> reproduce follows.\n\n> > mkdir testdir\n> > echo 'abc' >testdir/testfile\n> > git add testdir\n> > git commit -m foo\n> > git rm -r testdir\n> > mkdir testDir\n> > echo 'abc' >testDir/testfile\n> > git add testDir\n> > git commit -m bar\n\nPlease retry with current release condidate of 1.7.4; it has some \ncore.ignorecase improvements w.r.t. directories. It could well be that your \nproblem is fixed.\n\n-- Hannes\n"},{"id":"159858","messageId":"4D3F5C42.4040300@googlemail.com","threadId":"24958","inReplyTo":"201101252256.03644.j6t@kdbg.org","subject":"Re: git filter-branch can \"forget\" directories on case insensitive filesystems","fromName":"Simeon Maxein","fromEmail":"smaxein@googlemail.com","sentAt":"2011-01-25T23:26:58Z","receivedAt":"2011-01-25T23:26:58Z","isPatch":false,"sender":{"key":"smaxein@googlemail.com","avatar":"https://gravatar.com/avatar/f85c8c10abdc691c40249ebff4df1d31d57fa71e957154bf92f7058280d7208b?d=mp&s=160"},"body":"Am 25.01.2011 22:56, schrieb Johannes Sixt:\n> On Dienstag, 25. Januar 2011, Simeon Maxein wrote:\n>> In my opinion this is a quite serious issue, because files are lost\n>> without any indication to the user. As of git 1.7.3.1 (tested on\n>> Windows/NTFS with msysGit this time), the problem still exists. Please\n>> give it a look. Fullquote of the problem description / steps to\n>> reproduce follows.\n>>> mkdir testdir\n>>> echo 'abc' >testdir/testfile\n>>> git add testdir\n>>> git commit -m foo\n>>> git rm -r testdir\n>>> mkdir testDir\n>>> echo 'abc' >testDir/testfile\n>>> git add testDir\n>>> git commit -m bar\n> Please retry with current release condidate of 1.7.4; it has some \n> core.ignorecase improvements w.r.t. directories. It could well be that your \n> problem is fixed.\n>\n> -- Hannes\nThanks for the suggestion. The directory doesn't vanish anymore with\n1.7.4, so a big Thank You to the developers for improving this. When\nrewriting the second commit ls still prints testdir as lowercase though.\nMore of a nitpick, but it would still be neat to have it right.\n\nThe issue of extra files appearing during filter-branch (\nhttp://article.gmane.org/gmane.comp.version-control.git/154662 ) is\nstill present.\n\nSimeon\n"},{"id":"159859","messageId":"AANLkTimvwNs9EkV1GweT7VCdzvcz5J5_0pCUA44urQYH@mail.gmail.com","threadId":"24958","inReplyTo":"4D3F5C42.4040300@googlemail.com","subject":"Re: git filter-branch can \"forget\" directories on case insensitive filesystems","fromName":"Erik Faye-Lund","fromEmail":"kusmabite@gmail.com","sentAt":"2011-01-25T23:31:06Z","receivedAt":"2011-01-25T23:31:06Z","isPatch":false,"sender":{"key":"kusmabite@gmail.com","avatar":"https://avatars.githubusercontent.com/u/47073?v=4"},"body":"On Wed, Jan 26, 2011 at 12:26 AM, Simeon Maxein <smaxein@googlemail.com> wrote:\n> Am 25.01.2011 22:56, schrieb Johannes Sixt:\n>> On Dienstag, 25. Januar 2011, Simeon Maxein wrote:\n>>> In my opinion this is a quite serious issue, because files are lost\n>>> without any indication to the user. As of git 1.7.3.1 (tested on\n>>> Windows/NTFS with msysGit this time), the problem still exists. Please\n>>> give it a look. Fullquote of the problem description / steps to\n>>> reproduce follows.\n>>>> mkdir testdir\n>>>> echo 'abc' >testdir/testfile\n>>>> git add testdir\n>>>> git commit -m foo\n>>>> git rm -r testdir\n>>>> mkdir testDir\n>>>> echo 'abc' >testDir/testfile\n>>>> git add testDir\n>>>> git commit -m bar\n>> Please retry with current release condidate of 1.7.4; it has some\n>> core.ignorecase improvements w.r.t. directories. It could well be that your\n>> problem is fixed.\n>>\n>> -- Hannes\n> Thanks for the suggestion. The directory doesn't vanish anymore with\n> 1.7.4, so a big Thank You to the developers for improving this. When\n> rewriting the second commit ls still prints testdir as lowercase though.\n> More of a nitpick, but it would still be neat to have it right.\n>\n\nThis part is correct behavior  - git's internal representation is case\nsensitive. So git's record of the file is still 'testdir', even i\nyou've deleted it and created a new called 'testDir'.\n"},{"id":"159860","messageId":"4D3F69D2.800@googlemail.com","threadId":"24958","inReplyTo":"AANLkTimvwNs9EkV1GweT7VCdzvcz5J5_0pCUA44urQYH@mail.gmail.com","subject":"Re: git filter-branch can \"forget\" directories on case insensitive filesystems","fromName":"Simeon Maxein","fromEmail":"smaxein@googlemail.com","sentAt":"2011-01-26T00:24:50Z","receivedAt":"2011-01-26T00:24:50Z","isPatch":false,"sender":{"key":"smaxein@googlemail.com","avatar":"https://gravatar.com/avatar/f85c8c10abdc691c40249ebff4df1d31d57fa71e957154bf92f7058280d7208b?d=mp&s=160"},"body":"Am 26.01.2011 00:31, schrieb Erik Faye-Lund:\n> On Wed, Jan 26, 2011 at 12:26 AM, Simeon Maxein <smaxein@googlemail.com> wrote:\n>> Am 25.01.2011 22:56, schrieb Johannes Sixt:\n>>> On Dienstag, 25. Januar 2011, Simeon Maxein wrote:\n>>>> In my opinion this is a quite serious issue, because files are lost\n>>>> without any indication to the user. As of git 1.7.3.1 (tested on\n>>>> Windows/NTFS with msysGit this time), the problem still exists. Please\n>>>> give it a look. Fullquote of the problem description / steps to\n>>>> reproduce follows.\n>>>>> mkdir testdir\n>>>>> echo 'abc' >testdir/testfile\n>>>>> git add testdir\n>>>>> git commit -m foo\n>>>>> git rm -r testdir\n>>>>> mkdir testDir\n>>>>> echo 'abc' >testDir/testfile\n>>>>> git add testDir\n>>>>> git commit -m bar\n>>> Please retry with current release condidate of 1.7.4; it has some\n>>> core.ignorecase improvements w.r.t. directories. It could well be that your\n>>> problem is fixed.\n>>>\n>>> -- Hannes\n>> Thanks for the suggestion. The directory doesn't vanish anymore with\n>> 1.7.4, so a big Thank You to the developers for improving this. When\n>> rewriting the second commit ls still prints testdir as lowercase though.\n>> More of a nitpick, but it would still be neat to have it right.\n>>\n> This part is correct behavior  - git's internal representation is case\n> sensitive. So git's record of the file is still 'testdir', even i\n> you've deleted it and created a new called 'testDir'.\nA normal checkout for those commits results in \"testdir\" for the first\none and \"testDir\" for the second one, so git does store the name\ndifference. I would intuitively expect the trees prepared during\nfilter-branch to be consistent with the result of a checkout.\n\nSimeon\n"},{"id":"159863","messageId":"AANLkTikO+dSwRS-x0UUB35iSFK3iE9cMZ6ae6go=MHHY@mail.gmail.com","threadId":"24958","inReplyTo":"4D3F69D2.800@googlemail.com","subject":"Re: git filter-branch can \"forget\" directories on case insensitive filesystems","fromName":"Erik Faye-Lund","fromEmail":"kusmabite@gmail.com","sentAt":"2011-01-26T00:58:09Z","receivedAt":"2011-01-26T00:58:09Z","isPatch":false,"sender":{"key":"kusmabite@gmail.com","avatar":"https://avatars.githubusercontent.com/u/47073?v=4"},"body":"On Wed, Jan 26, 2011 at 1:24 AM, Simeon Maxein <smaxein@googlemail.com> wrote:\n> Am 26.01.2011 00:31, schrieb Erik Faye-Lund:\n>> On Wed, Jan 26, 2011 at 12:26 AM, Simeon Maxein <smaxein@googlemail.com> wrote:\n>>> Am 25.01.2011 22:56, schrieb Johannes Sixt:\n>>>> On Dienstag, 25. Januar 2011, Simeon Maxein wrote:\n>>>>> In my opinion this is a quite serious issue, because files are lost\n>>>>> without any indication to the user. As of git 1.7.3.1 (tested on\n>>>>> Windows/NTFS with msysGit this time), the problem still exists. Please\n>>>>> give it a look. Fullquote of the problem description / steps to\n>>>>> reproduce follows.\n>>>>>> mkdir testdir\n>>>>>> echo 'abc' >testdir/testfile\n>>>>>> git add testdir\n>>>>>> git commit -m foo\n>>>>>> git rm -r testdir\n>>>>>> mkdir testDir\n>>>>>> echo 'abc' >testDir/testfile\n>>>>>> git add testDir\n>>>>>> git commit -m bar\n>>>> Please retry with current release condidate of 1.7.4; it has some\n>>>> core.ignorecase improvements w.r.t. directories. It could well be that your\n>>>> problem is fixed.\n>>>>\n>>>> -- Hannes\n>>> Thanks for the suggestion. The directory doesn't vanish anymore with\n>>> 1.7.4, so a big Thank You to the developers for improving this. When\n>>> rewriting the second commit ls still prints testdir as lowercase though.\n>>> More of a nitpick, but it would still be neat to have it right.\n>>>\n>> This part is correct behavior  - git's internal representation is case\n>> sensitive. So git's record of the file is still 'testdir', even i\n>> you've deleted it and created a new called 'testDir'.\n> A normal checkout for those commits results in \"testdir\" for the first\n> one and \"testDir\" for the second one, so git does store the name\n> difference. I would intuitively expect the trees prepared during\n> filter-branch to be consistent with the result of a checkout.\n>\n\nI'm sorry, I misread what you wrote (I read the 'git rm testDir' as\n'rm testDir').\n\nThe reason the old folder name is output appears to be that \"git\ncheckout-index -f -u -a\" (called from git-filter-branch) doesn't\nchange the directory name when the directory is already there. But to\nbe honest, I'm not really sure if it should or not. I'm too tired to\nthink it through right now ;)\n"}]}