{"thread":{"id":"37909","subject":"Test failure","startedAt":"2014-11-08T19:28:32Z","lastAt":"2014-11-16T21:06:26Z","messageCount":26,"participants":["Michael Blume","Jeff King","Junio C Hamano","Torsten Bögershausen","Johannes Sixt","Andreas Schwab"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"251567","messageId":"CAO2U3QiFvwMiwVCdVju_vJKK_HVndpQf4VyrEaHeeVVN6rgYgA@mail.gmail.com","threadId":"37909","inReplyTo":null,"subject":"Test failure","fromName":"Michael Blume","fromEmail":"blume.mike@gmail.com","sentAt":"2014-11-08T19:28:32Z","receivedAt":"2014-11-08T19:28:32Z","isPatch":false,"sender":{"key":"blume.mike@gmail.com","avatar":"https://gravatar.com/avatar/1a7b440e1d942425ff4098ac7fc15b86b30cecaa56e1692a7ef8b5939ba25ea7?d=mp&s=160"},"body":"I'm on a macbook running a beta of Mac OS Yosemite 10.10.1. I've never\nbeen able to get GETTEXT to work so I have\n\nNO_GETTEXT=1\n\nin my makefile, but other than that I'm using the master branch of the\nofficial github mirror.\n\nWhen I build and run tests I get\n\n[11:17][michael.blume@tcc-michael-4:~/workspace/git/t(master)]$\n./t1410-reflog.sh\nok 1 - setup\nok 2 - rewind\nok 3 - corrupt and check\nok 4 - reflog expire --dry-run should not touch reflog\nok 5 - reflog expire\nok 6 - prune and fsck\nok 7 - recover and check\nok 8 - delete\nok 9 - rewind2\nok 10 - --expire=never\nok 11 - gc.reflogexpire=never\nok 12 - gc.reflogexpire=false\nok 13 - checkout should not delete log for packed ref\nnot ok 14 - stale dirs do not cause d/f conflicts (reflogs on)\n#\n# test_when_finished \"git branch -d a || git branch -d a/b\" &&\n#\n# git branch a/b master &&\n# echo \"a/b@{0} branch: Created from master\" >expect &&\n# git log -g --format=\"%gd %gs\" a/b >actual &&\n# test_cmp expect actual &&\n# git branch -d a/b &&\n#\n# # now logs/refs/heads/a is a stale directory, but\n# # we should move it out of the way to create \"a\" reflog\n# git branch a master &&\n# echo \"a@{0} branch: Created from master\" >expect &&\n# git log -g --format=\"%gd %gs\" a >actual &&\n# test_cmp expect actual\n#\nnot ok 15 - stale dirs do not cause d/f conflicts (reflogs off)\n#\n# test_when_finished \"git branch -d a || git branch -d a/b\" &&\n#\n# git branch a/b master &&\n# echo \"a/b@{0} branch: Created from master\" >expect &&\n# git log -g --format=\"%gd %gs\" a/b >actual &&\n# test_cmp expect actual &&\n# git branch -d a/b &&\n#\n# # same as before, but we only create a reflog for \"a\" if\n# # it already exists, which it does not\n# git -c core.logallrefupdates=false branch a master &&\n# : >expect &&\n# git log -g --format=\"%gd %gs\" a >actual &&\n# test_cmp expect actual\n#\n# failed 2 among 15 test(s)\n\n(I get the same thing with 'make test' but this is me just running the\nproblematic test)\n\nA quick search seems to indicate the test is pretty new?\nhttp://www.mail-archive.com/git@vger.kernel.org/msg60495.html\n\nTest passes in my ubuntu vm.\n"},{"id":"251569","messageId":"20141109014354.GA23883@peff.net","threadId":"37909","inReplyTo":"CAO2U3QiFvwMiwVCdVju_vJKK_HVndpQf4VyrEaHeeVVN6rgYgA@mail.gmail.com","subject":"Re: Test failure","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2014-11-09T01:43:54Z","receivedAt":"2014-11-09T01:43:54Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sat, Nov 08, 2014 at 11:28:32AM -0800, Michael Blume wrote:\n\n> When I build and run tests I get\n> \n> [11:17][michael.blume@tcc-michael-4:~/workspace/git/t(master)]$\n> ./t1410-reflog.sh\n\nWhat does \"./t1410-reflog.sh -v -i\" report?\n\n> A quick search seems to indicate the test is pretty new?\n> http://www.mail-archive.com/git@vger.kernel.org/msg60495.html\n\nYes, it is new. In these cases there's often some silly little\nplatform incompatibility in the test script, but I don't see one. So\nmaybe the incompatibility is in the code itself; I'm wondering if\nOS X returns something besides EISDIR when trying to open a directory.\n\nUnfortunately I don't have an OS X install handy to test on.\n\n-Peff\n"},{"id":"251570","messageId":"20141109015918.GA24736@peff.net","threadId":"37909","inReplyTo":"20141109014354.GA23883@peff.net","subject":"[PATCH] t1410: fix breakage on case-insensitive filesystems","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2014-11-09T01:59:18Z","receivedAt":"2014-11-09T01:59:18Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sat, Nov 08, 2014 at 08:43:54PM -0500, Jeff King wrote:\n\n> Unfortunately I don't have an OS X install handy to test on.\n\nI lied; it turns out I still had access to an old VM. The problem did\nturn out to be rather silly. Here's a patch.\n\n-- >8 --\nTwo tests recently added to t1410 create branches \"a\" and\n\"a/b\" to test d/f conflicts on reflogs. Earlier, unrelated\ntests in that script create the path \"A/B\" in the working\ntree.  There's no conflict on a case-sensitive filesystem,\nbut on a case-insensitive one, \"git log\" will complain that\n\"a/b\" is both a revision and a working tree path.\n\nWe could fix this by using a \"--\" to disambiguate, but we\nare probably better off using names that are less confusing\nto make it more clear that they are unrelated to the working\ntree files.  This patch turns \"a/b\" into \"one/two\".\n\nReported-by: Michael Blume <blume.mike@gmail.com>\nSigned-off-by: Jeff King <peff@peff.net>\n---\nThe line-diff is hard to read, but if anyone was looking for a chance to\ntest-drive contrib/diff-highlight, it does a good job of making the\nchange easy to see.\n\n t/t1410-reflog.sh | 36 ++++++++++++++++++------------------\n 1 file changed, 18 insertions(+), 18 deletions(-)\n\ndiff --git a/t/t1410-reflog.sh b/t/t1410-reflog.sh\nindex 976c1d4..8cf4461 100755\n--- a/t/t1410-reflog.sh\n+++ b/t/t1410-reflog.sh\n@@ -254,36 +254,36 @@ test_expect_success 'checkout should not delete log for packed ref' '\n '\n \n test_expect_success 'stale dirs do not cause d/f conflicts (reflogs on)' '\n-\ttest_when_finished \"git branch -d a || git branch -d a/b\" &&\n+\ttest_when_finished \"git branch -d one || git branch -d one/two\" &&\n \n-\tgit branch a/b master &&\n-\techo \"a/b@{0} branch: Created from master\" >expect &&\n-\tgit log -g --format=\"%gd %gs\" a/b >actual &&\n+\tgit branch one/two master &&\n+\techo \"one/two@{0} branch: Created from master\" >expect &&\n+\tgit log -g --format=\"%gd %gs\" one/two >actual &&\n \ttest_cmp expect actual &&\n-\tgit branch -d a/b &&\n+\tgit branch -d one/two &&\n \n-\t# now logs/refs/heads/a is a stale directory, but\n-\t# we should move it out of the way to create \"a\" reflog\n-\tgit branch a master &&\n-\techo \"a@{0} branch: Created from master\" >expect &&\n-\tgit log -g --format=\"%gd %gs\" a >actual &&\n+\t# now logs/refs/heads/one is a stale directory, but\n+\t# we should move it out of the way to create \"one\" reflog\n+\tgit branch one master &&\n+\techo \"one@{0} branch: Created from master\" >expect &&\n+\tgit log -g --format=\"%gd %gs\" one >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'stale dirs do not cause d/f conflicts (reflogs off)' '\n-\ttest_when_finished \"git branch -d a || git branch -d a/b\" &&\n+\ttest_when_finished \"git branch -d one || git branch -d one/two\" &&\n \n-\tgit branch a/b master &&\n-\techo \"a/b@{0} branch: Created from master\" >expect &&\n-\tgit log -g --format=\"%gd %gs\" a/b >actual &&\n+\tgit branch one/two master &&\n+\techo \"one/two@{0} branch: Created from master\" >expect &&\n+\tgit log -g --format=\"%gd %gs\" one/two >actual &&\n \ttest_cmp expect actual &&\n-\tgit branch -d a/b &&\n+\tgit branch -d one/two &&\n \n-\t# same as before, but we only create a reflog for \"a\" if\n+\t# same as before, but we only create a reflog for \"one\" if\n \t# it already exists, which it does not\n-\tgit -c core.logallrefupdates=false branch a master &&\n+\tgit -c core.logallrefupdates=false branch one master &&\n \t: >expect &&\n-\tgit log -g --format=\"%gd %gs\" a >actual &&\n+\tgit log -g --format=\"%gd %gs\" one >actual &&\n \ttest_cmp expect actual\n '\n \n-- \n2.1.2.596.g7379948\n"},{"id":"251574","messageId":"CAO2U3Qhgg4KULYnK7LG1saHsad85Owz+082FX-ROTGoWWO6NAg@mail.gmail.com","threadId":"37909","inReplyTo":"20141109014354.GA23883@peff.net","subject":"Re: Test failure","fromName":"Michael Blume","fromEmail":"blume.mike@gmail.com","sentAt":"2014-11-09T05:44:24Z","receivedAt":"2014-11-09T05:44:24Z","isPatch":false,"sender":{"key":"blume.mike@gmail.com","avatar":"https://gravatar.com/avatar/1a7b440e1d942425ff4098ac7fc15b86b30cecaa56e1692a7ef8b5939ba25ea7?d=mp&s=160"},"body":"$ ./t1410-reflog.sh -v -i\nInitialized empty Git repository in\n/Users/michael.blume/workspace/git/t/trash\ndirectory.t1410-reflog/.git/\nexpecting success:\nmkdir -p A/B &&\necho rat >C &&\necho ox >A/D &&\necho tiger >A/B/E &&\ngit add . &&\n\ntest_tick && git commit -m rabbit &&\nH=`git rev-parse --verify HEAD` &&\nA=`git rev-parse --verify HEAD:A` &&\nB=`git rev-parse --verify HEAD:A/B` &&\nC=`git rev-parse --verify HEAD:C` &&\nD=`git rev-parse --verify HEAD:A/D` &&\nE=`git rev-parse --verify HEAD:A/B/E` &&\ncheck_fsck &&\n\ntest_chmod +x C &&\ngit add C &&\ntest_tick && git commit -m dragon &&\nL=`git rev-parse --verify HEAD` &&\ncheck_fsck &&\n\nrm -f C A/B/E &&\necho snake >F &&\necho horse >A/G &&\ngit add F A/G &&\ntest_tick && git commit -a -m sheep &&\nF=`git rev-parse --verify HEAD:F` &&\nG=`git rev-parse --verify HEAD:A/G` &&\nI=`git rev-parse --verify HEAD:A` &&\nJ=`git rev-parse --verify HEAD` &&\ncheck_fsck &&\n\nrm -f A/G &&\ntest_tick && git commit -a -m monkey &&\nK=`git rev-parse --verify HEAD` &&\ncheck_fsck &&\n\ncheck_have A B C D E F G H I J K L &&\n\ngit prune &&\n\ncheck_have A B C D E F G H I J K L &&\n\ncheck_fsck &&\n\ntest_line_count = 4 .git/logs/refs/heads/master\n\n[master (root-commit) 07fcc4f] rabbit\n Author: A U Thor <author@example.com>\n 3 files changed, 3 insertions(+)\n create mode 100644 A/B/E\n create mode 100644 A/D\n create mode 100644 C\nChecking object directories: 100% (256/256), done.\n[master 7d1a0b8] dragon\n Author: A U Thor <author@example.com>\n 1 file changed, 0 insertions(+), 0 deletions(-)\n mode change 100644 => 100755 C\nChecking object directories: 100% (256/256), done.\n[master 15ab5f0] sheep\n Author: A U Thor <author@example.com>\n 4 files changed, 2 insertions(+), 2 deletions(-)\n delete mode 100644 A/B/E\n create mode 100644 A/G\n delete mode 100755 C\n create mode 100644 F\nChecking object directories: 100% (256/256), done.\n[master 3ac530f] monkey\n Author: A U Thor <author@example.com>\n 1 file changed, 1 deletion(-)\n delete mode 100644 A/G\nChecking object directories: 100% (256/256), done.\ntree\ntree\nblob\nblob\nblob\nblob\nblob\ncommit\ntree\ncommit\ncommit\ncommit\ntree\ntree\nblob\nblob\nblob\nblob\nblob\ncommit\ntree\ncommit\ncommit\ncommit\nChecking object directories: 100% (256/256), done.\nok 1 - setup\n\nexpecting success:\ntest_tick && git reset --hard HEAD~2 &&\ntest -f C &&\ntest -f A/B/E &&\n! test -f F &&\n! test -f A/G &&\n\ncheck_have A B C D E F G H I J K L &&\n\ngit prune &&\n\ncheck_have A B C D E F G H I J K L &&\n\ntest_line_count = 5 .git/logs/refs/heads/master\n\nHEAD is now at 7d1a0b8 dragon\ntree\ntree\nblob\nblob\nblob\nblob\nblob\ncommit\ntree\ncommit\ncommit\ncommit\ntree\ntree\nblob\nblob\nblob\nblob\nblob\ncommit\ntree\ncommit\ncommit\ncommit\nok 2 - rewind\n\nexpecting success:\n\ncorrupt $F &&\ncheck_fsck \"missing blob $F\"\n\n\nChecking object directories: 100% (256/256), done.\nmissing blob 9ae84adb2704cbd49549e52169b4043871e13432\nok 3 - corrupt and check\n\nexpecting success:\n\ngit reflog expire --dry-run \\\n--expire=$(($test_tick - 10000)) \\\n--expire-unreachable=$(($test_tick - 10000)) \\\n--stale-fix \\\n--all &&\n\ntest_line_count = 5 .git/logs/refs/heads/master &&\n\ncheck_fsck \"missing blob $F\"\n\nwould prune commit: sheep\nwould prune commit: monkey\nwould prune reset: moving to HEAD~2\nwould prune commit: sheep\nwould prune commit: monkey\nwould prune reset: moving to HEAD~2\nChecking object directories: 100% (256/256), done.\nmissing blob 9ae84adb2704cbd49549e52169b4043871e13432\nok 4 - reflog expire --dry-run should not touch reflog\n\nexpecting success:\n\ngit reflog expire --verbose \\\n--expire=$(($test_tick - 10000)) \\\n--expire-unreachable=$(($test_tick - 10000)) \\\n--stale-fix \\\n--all &&\n\ntest_line_count = 2 .git/logs/refs/heads/master &&\n\ncheck_fsck \"dangling commit $K\"\n\nMarking reachable objects...\nkeep commit (initial): rabbit\nkeep commit: dragon\nprune commit: sheep\nprune commit: monkey\nprune reset: moving to HEAD~2\nkeep commit (initial): rabbit\nkeep commit: dragon\nprune commit: sheep\nprune commit: monkey\nprune reset: moving to HEAD~2\nChecking object directories: 100% (256/256), done.\ndangling commit 3ac530f2f6c3a45206a6b2d455baf89d1c8f672d\nok 5 - reflog expire\n\nexpecting success:\n\ngit prune &&\ncheck_fsck &&\n\ncheck_have A B C D E H L &&\ncheck_dont_have F G I J K\n\n\nChecking object directories: 100% (256/256), done.\ntree\ntree\nblob\nblob\nblob\ncommit\ncommit\nfatal: git cat-file 9ae84adb2704cbd49549e52169b4043871e13432: bad file\nfatal: git cat-file 41ca11d3340423c1922fe4110d2327bda0891b45: bad file\nfatal: git cat-file 1fe0f573dce6e694ce16e98a936c65db295d1948: bad file\nfatal: git cat-file 15ab5f0ad4d9117a7cdcbea9673ec0fff6ca8e55: bad file\nfatal: git cat-file 3ac530f2f6c3a45206a6b2d455baf89d1c8f672d: bad file\nok 6 - prune and fsck\n\nexpecting success:\n\nrecover $F &&\ncheck_fsck \"dangling blob $F\"\n\n\nChecking object directories: 100% (256/256), done.\ndangling blob 9ae84adb2704cbd49549e52169b4043871e13432\nok 7 - recover and check\n\nexpecting success:\necho 1 > C &&\ntest_tick &&\ngit commit -m rat C &&\n\necho 2 > C &&\ntest_tick &&\ngit commit -m ox C &&\n\necho 3 > C &&\ntest_tick &&\ngit commit -m tiger C &&\n\nHEAD_entry_count=$(git reflog | wc -l) &&\nmaster_entry_count=$(git reflog show master | wc -l) &&\n\ntest $HEAD_entry_count = 5 &&\ntest $master_entry_count = 5 &&\n\n\ngit reflog delete master@{1} &&\ngit reflog show master > output &&\ntest $(($master_entry_count - 1)) = $(wc -l < output) &&\ntest $HEAD_entry_count = $(git reflog | wc -l) &&\n! grep ox < output &&\n\nmaster_entry_count=$(wc -l < output) &&\n\ngit reflog delete HEAD@{1} &&\ntest $(($HEAD_entry_count -1)) = $(git reflog | wc -l) &&\ntest $master_entry_count = $(git reflog show master | wc -l) &&\n\nHEAD_entry_count=$(git reflog | wc -l) &&\n\ngit reflog delete master@{07.04.2005.15:15:00.-0700} &&\ngit reflog show master > output &&\ntest $(($master_entry_count - 1)) = $(wc -l < output) &&\n! grep dragon < output\n\n\n[master b60a214] rat\n Author: A U Thor <author@example.com>\n 1 file changed, 1 insertion(+), 1 deletion(-)\n[master 9908ef9] ox\n Author: A U Thor <author@example.com>\n 1 file changed, 1 insertion(+), 1 deletion(-)\n[master b93561f] tiger\n Author: A U Thor <author@example.com>\n 1 file changed, 1 insertion(+), 1 deletion(-)\nok 8 - delete\n\nexpecting success:\n\ntest_tick && git reset --hard HEAD~2 &&\ntest_line_count = 4 .git/logs/refs/heads/master\n\nHEAD is now at b60a214 rat\nok 9 - rewind2\n\nexpecting success:\n\ngit reflog expire --verbose \\\n--expire=never \\\n--expire-unreachable=never \\\n--all &&\ntest_line_count = 4 .git/logs/refs/heads/master\n\nkeep commit (initial): rabbit\nkeep commit: dragon\nkeep commit: rat\nkeep commit: tiger\nkeep reset: moving to HEAD~2\nkeep commit (initial): rabbit\nkeep commit: rat\nkeep commit: tiger\nkeep reset: moving to HEAD~2\nok 10 - --expire=never\n\nexpecting success:\n\ngit config gc.reflogexpire never &&\ngit config gc.reflogexpireunreachable never &&\ngit reflog expire --verbose --all &&\ntest_line_count = 4 .git/logs/refs/heads/master\n\nkeep commit (initial): rabbit\nkeep commit: dragon\nkeep commit: rat\nkeep commit: tiger\nkeep reset: moving to HEAD~2\nkeep commit (initial): rabbit\nkeep commit: rat\nkeep commit: tiger\nkeep reset: moving to HEAD~2\nok 11 - gc.reflogexpire=never\n\nexpecting success:\n\ngit config gc.reflogexpire false &&\ngit config gc.reflogexpireunreachable false &&\ngit reflog expire --verbose --all &&\ntest_line_count = 4 .git/logs/refs/heads/master &&\n\ngit config --unset gc.reflogexpire &&\ngit config --unset gc.reflogexpireunreachable\n\n\nkeep commit (initial): rabbit\nkeep commit: dragon\nkeep commit: rat\nkeep commit: tiger\nkeep reset: moving to HEAD~2\nkeep commit (initial): rabbit\nkeep commit: rat\nkeep commit: tiger\nkeep reset: moving to HEAD~2\nok 12 - gc.reflogexpire=false\n\nexpecting success:\ntest $(git reflog master | wc -l) = 4 &&\ngit branch foo &&\ngit pack-refs --all &&\ngit checkout foo &&\ntest $(git reflog master | wc -l) = 4\n\nSwitched to branch 'foo'\nok 13 - checkout should not delete log for packed ref\n\nexpecting success:\ntest_when_finished \"git branch -d a || git branch -d a/b\" &&\n\ngit branch a/b master &&\necho \"a/b@{0} branch: Created from master\" >expect &&\ngit log -g --format=\"%gd %gs\" a/b >actual &&\ntest_cmp expect actual &&\ngit branch -d a/b &&\n\n# now logs/refs/heads/a is a stale directory, but\n# we should move it out of the way to create \"a\" reflog\ngit branch a master &&\necho \"a@{0} branch: Created from master\" >expect &&\ngit log -g --format=\"%gd %gs\" a >actual &&\ntest_cmp expect actual\n\nfatal: ambiguous argument 'a/b': both revision and filename\nUse '--' to separate paths from revisions, like this:\n'git <command> [<revision>...] -- [<file>...]'\nnot ok 14 - stale dirs do not cause d/f conflicts (reflogs on)\n#\n# test_when_finished \"git branch -d a || git branch -d a/b\" &&\n#\n# git branch a/b master &&\n# echo \"a/b@{0} branch: Created from master\" >expect &&\n# git log -g --format=\"%gd %gs\" a/b >actual &&\n# test_cmp expect actual &&\n# git branch -d a/b &&\n#\n# # now logs/refs/heads/a is a stale directory, but\n# # we should move it out of the way to create \"a\" reflog\n# git branch a master &&\n# echo \"a@{0} branch: Created from master\" >expect &&\n# git log -g --format=\"%gd %gs\" a >actual &&\n# test_cmp expect actual\n#\n\nOn Sat, Nov 8, 2014 at 5:43 PM, Jeff King <peff@peff.net> wrote:\n> On Sat, Nov 08, 2014 at 11:28:32AM -0800, Michael Blume wrote:\n>\n>> When I build and run tests I get\n>>\n>> [11:17][michael.blume@tcc-michael-4:~/workspace/git/t(master)]$\n>> ./t1410-reflog.sh\n>\n> What does \"./t1410-reflog.sh -v -i\" report?\n>\n>> A quick search seems to indicate the test is pretty new?\n>> http://www.mail-archive.com/git@vger.kernel.org/msg60495.html\n>\n> Yes, it is new. In these cases there's often some silly little\n> platform incompatibility in the test script, but I don't see one. So\n> maybe the incompatibility is in the code itself; I'm wondering if\n> OS X returns something besides EISDIR when trying to open a directory.\n>\n> Unfortunately I don't have an OS X install handy to test on.\n>\n> -Peff\n"},{"id":"251624","messageId":"CAO2U3QiNYCWF_otPnR43gHNA22otR62aC2g8b0CnxVz3rjp7kQ@mail.gmail.com","threadId":"37909","inReplyTo":"20141109015918.GA24736@peff.net","subject":"Re: [PATCH] t1410: fix breakage on case-insensitive filesystems","fromName":"Michael Blume","fromEmail":"blume.mike@gmail.com","sentAt":"2014-11-09T17:34:34Z","receivedAt":"2014-11-09T17:34:34Z","isPatch":true,"sender":{"key":"blume.mike@gmail.com","avatar":"https://gravatar.com/avatar/1a7b440e1d942425ff4098ac7fc15b86b30cecaa56e1692a7ef8b5939ba25ea7?d=mp&s=160"},"body":"Works for me, thanks =)\n\nI'm curious now, is there an automated build of git running on a mac\nanywhere? There's a mac mini running jenkins in my office and it's\npossible I could convince someone to let me set up a git build that'll\ne-mail me if there's a test failure.\n\nOn Sat, Nov 8, 2014 at 5:59 PM, Jeff King <peff@peff.net> wrote:\n> On Sat, Nov 08, 2014 at 08:43:54PM -0500, Jeff King wrote:\n>\n>> Unfortunately I don't have an OS X install handy to test on.\n>\n> I lied; it turns out I still had access to an old VM. The problem did\n> turn out to be rather silly. Here's a patch.\n>\n> -- >8 --\n> Two tests recently added to t1410 create branches \"a\" and\n> \"a/b\" to test d/f conflicts on reflogs. Earlier, unrelated\n> tests in that script create the path \"A/B\" in the working\n> tree.  There's no conflict on a case-sensitive filesystem,\n> but on a case-insensitive one, \"git log\" will complain that\n> \"a/b\" is both a revision and a working tree path.\n>\n> We could fix this by using a \"--\" to disambiguate, but we\n> are probably better off using names that are less confusing\n> to make it more clear that they are unrelated to the working\n> tree files.  This patch turns \"a/b\" into \"one/two\".\n>\n> Reported-by: Michael Blume <blume.mike@gmail.com>\n> Signed-off-by: Jeff King <peff@peff.net>\n> ---\n> The line-diff is hard to read, but if anyone was looking for a chance to\n> test-drive contrib/diff-highlight, it does a good job of making the\n> change easy to see.\n>\n>  t/t1410-reflog.sh | 36 ++++++++++++++++++------------------\n>  1 file changed, 18 insertions(+), 18 deletions(-)\n>\n> diff --git a/t/t1410-reflog.sh b/t/t1410-reflog.sh\n> index 976c1d4..8cf4461 100755\n> --- a/t/t1410-reflog.sh\n> +++ b/t/t1410-reflog.sh\n> @@ -254,36 +254,36 @@ test_expect_success 'checkout should not delete log for packed ref' '\n>  '\n>\n>  test_expect_success 'stale dirs do not cause d/f conflicts (reflogs on)' '\n> -       test_when_finished \"git branch -d a || git branch -d a/b\" &&\n> +       test_when_finished \"git branch -d one || git branch -d one/two\" &&\n>\n> -       git branch a/b master &&\n> -       echo \"a/b@{0} branch: Created from master\" >expect &&\n> -       git log -g --format=\"%gd %gs\" a/b >actual &&\n> +       git branch one/two master &&\n> +       echo \"one/two@{0} branch: Created from master\" >expect &&\n> +       git log -g --format=\"%gd %gs\" one/two >actual &&\n>         test_cmp expect actual &&\n> -       git branch -d a/b &&\n> +       git branch -d one/two &&\n>\n> -       # now logs/refs/heads/a is a stale directory, but\n> -       # we should move it out of the way to create \"a\" reflog\n> -       git branch a master &&\n> -       echo \"a@{0} branch: Created from master\" >expect &&\n> -       git log -g --format=\"%gd %gs\" a >actual &&\n> +       # now logs/refs/heads/one is a stale directory, but\n> +       # we should move it out of the way to create \"one\" reflog\n> +       git branch one master &&\n> +       echo \"one@{0} branch: Created from master\" >expect &&\n> +       git log -g --format=\"%gd %gs\" one >actual &&\n>         test_cmp expect actual\n>  '\n>\n>  test_expect_success 'stale dirs do not cause d/f conflicts (reflogs off)' '\n> -       test_when_finished \"git branch -d a || git branch -d a/b\" &&\n> +       test_when_finished \"git branch -d one || git branch -d one/two\" &&\n>\n> -       git branch a/b master &&\n> -       echo \"a/b@{0} branch: Created from master\" >expect &&\n> -       git log -g --format=\"%gd %gs\" a/b >actual &&\n> +       git branch one/two master &&\n> +       echo \"one/two@{0} branch: Created from master\" >expect &&\n> +       git log -g --format=\"%gd %gs\" one/two >actual &&\n>         test_cmp expect actual &&\n> -       git branch -d a/b &&\n> +       git branch -d one/two &&\n>\n> -       # same as before, but we only create a reflog for \"a\" if\n> +       # same as before, but we only create a reflog for \"one\" if\n>         # it already exists, which it does not\n> -       git -c core.logallrefupdates=false branch a master &&\n> +       git -c core.logallrefupdates=false branch one master &&\n>         : >expect &&\n> -       git log -g --format=\"%gd %gs\" a >actual &&\n> +       git log -g --format=\"%gd %gs\" one >actual &&\n>         test_cmp expect actual\n>  '\n>\n> --\n> 2.1.2.596.g7379948\n>\n"},{"id":"251629","messageId":"xmqqtx28b6z6.fsf@gitster.dls.corp.google.com","threadId":"37909","inReplyTo":"CAO2U3QiNYCWF_otPnR43gHNA22otR62aC2g8b0CnxVz3rjp7kQ@mail.gmail.com","subject":"Re: [PATCH] t1410: fix breakage on case-insensitive filesystems","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-11-09T17:48:29Z","receivedAt":"2014-11-09T17:48:29Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Michael Blume <blume.mike@gmail.com> writes:\n\n> Works for me, thanks =)\n>\n> I'm curious now, is there an automated build of git running on a mac\n> anywhere? There's a mac mini running jenkins in my office and it's\n> possible I could convince someone to let me set up a git build that'll\n> e-mail me if there's a test failure.\n\nI am not aware of a Macintosh person who regularly runs tests, but\nif there were, we hopefully will hear from them soonish ;-).\n\nThanks for the offer, we would definitely want to take you up on\nthat, if there is nobody doing that already.\n"},{"id":"251635","messageId":"545FC8D1.1040803@web.de","threadId":"37909","inReplyTo":"CAO2U3QiNYCWF_otPnR43gHNA22otR62aC2g8b0CnxVz3rjp7kQ@mail.gmail.com","subject":"Re: [PATCH] t1410: fix breakage on case-insensitive filesystems","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2014-11-09T20:04:33Z","receivedAt":"2014-11-09T20:04:33Z","isPatch":true,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On 09.11.14 18:34, Michael Blume wrote:\n> Works for me, thanks =)\n> \n> I'm curious now, is there an automated build of git running on a mac\n> anywhere? There's a mac mini running jenkins in my office and it's\n> possible I could convince someone to let me set up a git build that'll\n> e-mail me if there's a test failure.\n\nThe basic idea is to run \nmake clean &&\ngit fetch git.git &&\ngit checkout git.git/pu &&\nmake -k test\n\n(and pipe stdlog+stdout into a file)\n\nI have a script here doing that, if you want, I can send it to you\n\n\n\n \n"},{"id":"251636","messageId":"CAO2U3QgpyxqmDWmN7v8W742hNpj-kzhuFEJjO6mZrSRHK9jvoA@mail.gmail.com","threadId":"37909","inReplyTo":"545FC8D1.1040803@web.de","subject":"Re: [PATCH] t1410: fix breakage on case-insensitive filesystems","fromName":"Michael Blume","fromEmail":"blume.mike@gmail.com","sentAt":"2014-11-09T21:36:31Z","receivedAt":"2014-11-09T21:36:31Z","isPatch":true,"sender":{"key":"blume.mike@gmail.com","avatar":"https://gravatar.com/avatar/1a7b440e1d942425ff4098ac7fc15b86b30cecaa56e1692a7ef8b5939ba25ea7?d=mp&s=160"},"body":"Actually I have a build break in pu on my mac right now. Seems to\nbuild fine in ubuntu, but:\n\nprogress.c:66:15: error: use of undeclared identifier 'CLOCK_MONOTONIC'\n        timer_create(CLOCK_MONOTONIC, &sev, &progress_timer);\n                     ^\n./git-compat-util.h:233:54: note: expanded from macro 'timer_create'\n#define timer_create(clockid, sevp, timerp) ((void) (clockid), (void) (s...\n                                                     ^\nprogress.c:71:2: warning: incompatible pointer to integer conversion assigning\n      to '__darwin_time_t' (aka 'long') from '__darwin_time_t *' (aka 'long *');\n      remove & [-Wint-conversion]\n        timer_settime(progress_timer, 0, &value, NULL);\n        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n./git-compat-util.h:242:29: note: expanded from macro 'timer_settime'\n        _ivalue.it_interval.tv_sec = value.it_interval.tv_sec;\n         \\\n                                   ^ ~~~~~~~~~~~~~~~~~~~~~~~~\nprogress.c:71:2: error: invalid operands to binary expression\n      ('long *' and 'long')\n        timer_settime(progress_timer, 0, &value, NULL);\n        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n./git-compat-util.h:243:58: note: expanded from macro 'timer_settime'\n        _ivalue.it_interval.tv_usec = value.it_interval.tv_nsec /\n1000L;        \\\n                                      ~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~\nprogress.c:71:2: error: use of undeclared identifier '_ivalue_it_value'\n./git-compat-util.h:245:2: note: expanded from macro 'timer_settime'\n        _ivalue_it_value.tv_usec = value.it_value.tv_nsec / 1000L...\n        ^\nprogress.c:71:2: error: invalid operands to binary expression\n      ('long *' and 'long')\n        timer_settime(progress_timer, 0, &value, NULL);\n        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n./git-compat-util.h:245:52: note: expanded from macro 'timer_settime'\n        _ivalue_it_value.tv_usec = value.it_value.tv_nsec / 1000L;\n         \\\n                                   ~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~\nprogress.c:71:35: warning: expression result unused [-Wunused-value]\n        timer_settime(progress_timer, 0, &value, NULL);\n        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~\n./git-compat-util.h:244:27: note: expanded from macro 'timer_settime'\n        _ivalue.it_value.tv_sec  value.it_value.tv_sec...\n                                 ^\nprogress.c:74:1: error: expected 'while' in do/while loop\nstatic void clear_progress_signal(void)\n^\nprogress.c:71:2: note: to match this 'do'\n        timer_settime(progress_timer, 0, &value, NULL);\n        ^\n./git-compat-util.h:240:52: note: expanded from macro 'timer_settime'\n  ...flags, value, ovalue) do {                         \\\n                           ^\nprogress.c:264:2: error: expected '}'\n}\n ^\nprogress.c:50:1: note: to match this '{'\n{\n^\n2 warnings and 6 errors generated.\nmake: *** [progress.o] Error 1\n\nOn Sun, Nov 9, 2014 at 12:04 PM, Torsten Bögershausen <tboegi@web.de> wrote:\n> On 09.11.14 18:34, Michael Blume wrote:\n>> Works for me, thanks =)\n>>\n>> I'm curious now, is there an automated build of git running on a mac\n>> anywhere? There's a mac mini running jenkins in my office and it's\n>> possible I could convince someone to let me set up a git build that'll\n>> e-mail me if there's a test failure.\n>\n> The basic idea is to run\n> make clean &&\n> git fetch git.git &&\n> git checkout git.git/pu &&\n> make -k test\n>\n> (and pipe stdlog+stdout into a file)\n>\n> I have a script here doing that, if you want, I can send it to you\n>\n>\n>\n>\n>\n"},{"id":"251638","messageId":"545FDFDF.7070102@web.de","threadId":"37909","inReplyTo":"CAO2U3QgpyxqmDWmN7v8W742hNpj-kzhuFEJjO6mZrSRHK9jvoA@mail.gmail.com","subject":"Re: [PATCH] t1410: fix breakage on case-insensitive filesystems","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2014-11-09T21:42:55Z","receivedAt":"2014-11-09T21:42:55Z","isPatch":true,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On 2014-11-09 22.36, Michael Blume wrote:\n> Actually I have a build break in pu on my mac right now. Seems to\n> build fine in ubuntu, but:\n>\n> progress.c:66:15: error: use of undeclared identifier 'CLOCK_MONOTONIC'\n>         timer_create(CLOCK_MONOTONIC, &sev, &progress_timer);\nThat is not an unkown issue.\nYou need to revert one commit (this is my copy of pu from today)\n\n Revert \"use timer_settime() for new platforms\"\n   \n This reverts commit 0950f08806208b4e3d0aff5f4f7d497637ba4cab.\n"},{"id":"251646","messageId":"CAO2U3Qh4w8aeMBVMJrVqmBwEVoobpQ=5BraEwENzfymyn=ezow@mail.gmail.com","threadId":"37909","inReplyTo":"545FDFDF.7070102@web.de","subject":"Re: [PATCH] t1410: fix breakage on case-insensitive filesystems","fromName":"Michael Blume","fromEmail":"blume.mike@gmail.com","sentAt":"2014-11-10T02:46:01Z","receivedAt":"2014-11-10T02:46:01Z","isPatch":true,"sender":{"key":"blume.mike@gmail.com","avatar":"https://gravatar.com/avatar/1a7b440e1d942425ff4098ac7fc15b86b30cecaa56e1692a7ef8b5939ba25ea7?d=mp&s=160"},"body":"Ok, with that I have a different test failure on the pu branch --\nplease tell me if I'm spamming the list or if there's some other\nprotocol I should be using to report issues on pu.\n\n$ ./t4213-log-remerge-diff.sh -v\nInitialized empty Git repository in\n/Users/michael.blume/workspace/git/t/trash\ndirectory.t4213-log-remerge-diff/.git/\nexpecting success:\ntest_commit A file original &&\ntest_commit B file change &&\ngit checkout -b side A &&\ntest_commit C file side &&\ngit checkout -b delete A &&\ngit rm file &&\ntest_commit D &&\ngit checkout -b benign master &&\ntest_must_fail git merge C &&\ntest_commit M1 file merged &&\ngit checkout -b evil B &&\ntest_must_fail git merge C &&\ntest_commit M2 file change &&\ngit checkout -b dm C &&\ntest_must_fail git merge D &&\ntest_commit M3 file resolved &&\ngit checkout -b unrelated A &&\ntest_commit unrelated_file &&\ngit merge C &&\ntest_tick &&\ngit tag M4 &&\ngit checkout -b dir A &&\nmkdir sub &&\ntest_commit dir sub/file &&\ngit checkout -b file A &&\ntest_commit file sub &&\ngit checkout -b dirfile tags/dir &&\ntest_must_fail git merge tags/file &&\ngit rm --cached sub &&\ntest_commit M5 sub/file resolved &&\ngit checkout -b filedir tags/file &&\ntest_must_fail git merge tags/dir &&\ngit rm --cached sub/file &&\nrm -rf sub &&\ntest_commit M6 sub resolved &&\ngit branch -D master side delete dir file\n\n[master (root-commit) aca07f6] A\n Author: A U Thor <author@example.com>\n 1 file changed, 1 insertion(+)\n create mode 100644 file\n[master a3cd1bc] B\n Author: A U Thor <author@example.com>\n 1 file changed, 1 insertion(+), 1 deletion(-)\nSwitched to a new branch 'side'\n[side 61d2ae1] C\n Author: A U Thor <author@example.com>\n 1 file changed, 1 insertion(+), 1 deletion(-)\nSwitched to a new branch 'delete'\nrm 'file'\n[delete 63d1471] D\n Author: A U Thor <author@example.com>\n 2 files changed, 1 insertion(+), 1 deletion(-)\n create mode 100644 D.t\n delete mode 100644 file\nSwitched to a new branch 'benign'\nMerging:\na3cd1bc B\nvirtual C\nfound 1 common ancestor:\naca07f6 A\nAuto-merging file\nCONFLICT (content): Merge conflict in file\nAutomatic merge failed; fix conflicts and then commit the result.\n[benign 19968bc] M1\n Author: A U Thor <author@example.com>\nSwitched to a new branch 'evil'\nMerging:\na3cd1bc B\nvirtual C\nfound 1 common ancestor:\naca07f6 A\nAuto-merging file\nCONFLICT (content): Merge conflict in file\nAutomatic merge failed; fix conflicts and then commit the result.\n[evil 93e9c1d] M2\n Author: A U Thor <author@example.com>\nSwitched to a new branch 'dm'\nMerging:\n61d2ae1 C\nvirtual D\nfound 1 common ancestor:\naca07f6 A\nCONFLICT (modify/delete): file deleted in D and modified in HEAD.\nVersion HEAD of file left in tree.\nAutomatic merge failed; fix conflicts and then commit the result.\n[dm 35c618f] M3\n Author: A U Thor <author@example.com>\nSwitched to a new branch 'unrelated'\n[unrelated c19dbae] unrelated_file\n Author: A U Thor <author@example.com>\n 1 file changed, 1 insertion(+)\n create mode 100644 unrelated_file.t\nMerging:\nc19dbae unrelated_file\nvirtual C\nfound 1 common ancestor:\naca07f6 A\nMerge made by the 'recursive' strategy.\n file | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\nSwitched to a new branch 'dir'\n[dir 8ac24b8] dir\n Author: A U Thor <author@example.com>\n 1 file changed, 1 insertion(+)\n create mode 100644 sub/file\nSwitched to a new branch 'file'\n[file 36416b6] file\n Author: A U Thor <author@example.com>\n 1 file changed, 1 insertion(+)\n create mode 100644 sub\nSwitched to a new branch 'dirfile'\nMerging:\n8ac24b8 dir\nvirtual tags/file\nfound 1 common ancestor:\naca07f6 A\nAdding sub/file\nCONFLICT (directory/file): There is a directory with name sub in HEAD.\nAdding sub as sub~tags_file\nAutomatic merge failed; fix conflicts and then commit the result.\nsub: needs merge\nrm 'sub'\n[dirfile f0a64c3] M5\n Author: A U Thor <author@example.com>\nSwitched to a new branch 'filedir'\nMerging:\n36416b6 file\nvirtual tags/dir\nfound 1 common ancestor:\naca07f6 A\nAdding sub/file\nRemoving sub to make room for subdirectory\n\nCONFLICT (file/directory): There is a directory with name sub in\ntags/dir. Adding sub as sub~HEAD\nAutomatic merge failed; fix conflicts and then commit the result.\nrm 'sub/file'\n[filedir 7182a02] M6\n Author: A U Thor <author@example.com>\nDeleted branch master (was a3cd1bc).\nDeleted branch side (was 61d2ae1).\nDeleted branch delete (was 63d1471).\nDeleted branch dir (was 8ac24b8).\nDeleted branch file (was 36416b6).\nok 1 - setup\n\nexpecting success:\ngit log -p --cc unrelated >expected &&\ngit log -p --remerge-diff unrelated >actual &&\ntest_cmp expected actual\n\nok 2 - unrelated merge: without conflicts\n\nexpecting success:\ngit log -1 -p --remerge-diff benign >output &&\nclean_output <output >actual &&\ntest_cmp expected actual\n\n--- expected 2014-11-10 02:43:34.000000000 +0000\n+++ actual 2014-11-10 02:43:34.000000000 +0000\n@@ -1,12 +1,12 @@\n commit benign\n-Merge:\n+Merge: a3cd1bc 61d2ae1\n Author: A U Thor <author@example.com>\n-Date:\n+Date:   Thu Apr 7 15:17:13 2005 -0700\n\n     M1\n\n diff --git a/file b/file\n-index\n+index cc073fb..20b117f 100644\n --- a/file\n +++ b/file\n @@ -1,5 +1 @@\nnot ok 3 - benign merge: conflicts resolved\n#\n# git log -1 -p --remerge-diff benign >output &&\n# clean_output <output >actual &&\n# test_cmp expected actual\n#\n\nexpecting success:\ngit log -1 --remerge-diff -p evil >output &&\nclean_output <output >actual &&\ntest_cmp expected actual\n\n--- expected 2014-11-10 02:43:34.000000000 +0000\n+++ actual 2014-11-10 02:43:34.000000000 +0000\n@@ -1,12 +1,12 @@\n commit evil\n-Merge:\n+Merge: a3cd1bc 61d2ae1\n Author: A U Thor <author@example.com>\n-Date:\n+Date:   Thu Apr 7 15:18:13 2005 -0700\n\n     M2\n\n diff --git a/file b/file\n-index\n+index cc073fb..0835e4f 100644\n --- a/file\n +++ b/file\n @@ -1,5 +1 @@\nnot ok 4 - evil merge: changes ignored\n#\n# git log -1 --remerge-diff -p evil >output &&\n# clean_output <output >actual &&\n# test_cmp expected actual\n#\n\nexpecting success:\ngit log -1 --remerge-diff -p dm >output &&\nclean_output <output >actual &&\ntest_cmp expected actual\n\n--- expected 2014-11-10 02:43:34.000000000 +0000\n+++ actual 2014-11-10 02:43:34.000000000 +0000\n@@ -1,12 +1,12 @@\n commit dm\n-Merge:\n+Merge: 61d2ae1 63d1471\n Author: A U Thor <author@example.com>\n-Date:\n+Date:   Thu Apr 7 15:19:13 2005 -0700\n\n     M3\n\n diff --git a/file b/file\n-index\n+index dd79d22..2ab19ae 100644\n --- a/file\n +++ b/file\n @@ -1,4 +1 @@\nnot ok 5 - delete/modify conflict\n#\n# git log -1 --remerge-diff -p dm >output &&\n# clean_output <output >actual &&\n# test_cmp expected actual\n#\n\nexpecting success:\ngit log -1 --remerge-diff -p dirfile >output &&\nclean_output <output >actual &&\ntest_cmp expected actual\n\n--- expected 2014-11-10 02:43:35.000000000 +0000\n+++ actual 2014-11-10 02:43:35.000000000 +0000\n@@ -1,12 +1,12 @@\n commit dirfile\n-Merge:\n+Merge: 8ac24b8 36416b6\n Author: A U Thor <author@example.com>\n-Date:\n+Date:   Thu Apr 7 15:24:13 2005 -0700\n\n     M5\n\n diff --git a/sub/file b/sub/file\n-index\n+index 0d2ecd7..2ab19ae 100644\n --- a/sub/file\n +++ b/sub/file\n @@ -1 +1 @@\n@@ -14,7 +14,7 @@\n +resolved\n diff --git a/sub~tags/file b/sub~tags/file\n deleted file mode 100644\n-index\n+index f73f309..0000000\n --- a/sub~tags/file\n +++ /dev/null\n @@ -1 +0,0 @@\nnot ok 6 - file/directory conflict resulting in directory\n#\n# git log -1 --remerge-diff -p dirfile >output &&\n# clean_output <output >actual &&\n# test_cmp expected actual\n#\n\nchecking known breakage:\ngit log -1 --remerge-diff -p filedir >output &&\nclean_output <output >actual &&\ntest_cmp expected actual\n\n--- expected 2014-11-10 02:43:35.000000000 +0000\n+++ actual 2014-11-10 02:43:35.000000000 +0000\n@@ -1,21 +1,28 @@\n commit filedir\n-Merge:\n+Merge: 36416b6 8ac24b8\n Author: A U Thor <author@example.com>\n-Date:\n+Date:   Thu Apr 7 15:25:13 2005 -0700\n\n     M6\n\n diff --git a/sub b/sub\n-index\n---- a/sub\n+new file mode 100644\n+index 0000000..2ab19ae\n+--- /dev/null\n +++ b/sub\n-@@ -1 +1 @@\n--file\n+@@ -0,0 +1 @@\n +resolved\n diff --git a/sub/file b/sub/file\n deleted file mode 100644\n-index\n+index 0d2ecd7..0000000\n --- a/sub/file\n +++ /dev/null\n @@ -1 +0,0 @@\n -dir\n+diff --git a/sub~tags/file b/sub~tags/file\n+deleted file mode 100644\n+index f73f309..0000000\n+--- a/sub~tags/file\n++++ /dev/null\n+@@ -1 +0,0 @@\n+-file\nnot ok 7 - file/directory conflict resulting in file # TODO known breakage\n\n# still have 1 known breakage(s)\n# failed 4 among remaining 6 test(s)\n1..7\n\nOn Sun, Nov 9, 2014 at 1:42 PM, Torsten Bögershausen <tboegi@web.de> wrote:\n> On 2014-11-09 22.36, Michael Blume wrote:\n>> Actually I have a build break in pu on my mac right now. Seems to\n>> build fine in ubuntu, but:\n>>\n>> progress.c:66:15: error: use of undeclared identifier 'CLOCK_MONOTONIC'\n>>         timer_create(CLOCK_MONOTONIC, &sev, &progress_timer);\n> That is not an unkown issue.\n> You need to revert one commit (this is my copy of pu from today)\n>\n>  Revert \"use timer_settime() for new platforms\"\n>\n>  This reverts commit 0950f08806208b4e3d0aff5f4f7d497637ba4cab.\n>\n"},{"id":"251647","messageId":"CAPc5daUJBs-GwEkJPwru6wjb6pJOMSceEAznXQ+ZW-mOyr-ipw@mail.gmail.com","threadId":"37909","inReplyTo":"20141109015918.GA24736@peff.net","subject":"Re: [PATCH] t1410: fix breakage on case-insensitive filesystems","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-11-10T02:56:45Z","receivedAt":"2014-11-10T02:56:45Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"On Sat, Nov 8, 2014 at 5:59 PM, Jeff King <peff@peff.net> wrote:\n>\n> Two tests recently added to t1410 create branches \"a\" and\n> \"a/b\" to test d/f conflicts on reflogs. Earlier, unrelated\n> tests in that script create the path \"A/B\" in the working\n> tree.  There's no conflict on a case-sensitive filesystem,\n> but on a case-insensitive one, \"git log\" will complain that\n> \"a/b\" is both a revision and a working tree path.\n\nThanks for a clear problem description.\n\n> We could fix this by using a \"--\" to disambiguate, but we\n> are probably better off using names that are less confusing\n> to make it more clear that they are unrelated to the working\n> tree files.  This patch turns \"a/b\" into \"one/two\".\n\nHmph, but the branch a and the file A _do_ have names that are\nunrelated to each other, and it is only the case insensitive fs\nthat is confused ;-).  Renaming is not so bad and certainly is\nnot wrong per-se as a workaround, but I have this suspicion\nthat it sends a wrong message to people on such a filesystem,\nnamely, \"you cannot use Git to manage a file called 'master'\",\nor something silly like that. Disambiguation with double-dashes\ndoes not have such a problem, and instead shows a way how\nscripts that are meant to be portable is written. More importantly,\nthat is more in line with the problem description (i.e. we complain\npointing out the ambiguity, implying that everything is fine as long\nas you disambiguate).\n\nSo I would rather see the workaround done that way.\n\nBut that is only if this were before you actually wrote the patch.\nThe above is not a preference strong enough to make me ask\nyou to reroll ;-)\n\nThanks.\n"},{"id":"251648","messageId":"20141110060935.GA24860@peff.net","threadId":"37909","inReplyTo":"CAPc5daUJBs-GwEkJPwru6wjb6pJOMSceEAznXQ+ZW-mOyr-ipw@mail.gmail.com","subject":"Re: [PATCH] t1410: fix breakage on case-insensitive filesystems","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2014-11-10T06:09:35Z","receivedAt":"2014-11-10T06:09:35Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sun, Nov 09, 2014 at 06:56:45PM -0800, Junio C Hamano wrote:\n\n> > We could fix this by using a \"--\" to disambiguate, but we\n> > are probably better off using names that are less confusing\n> > to make it more clear that they are unrelated to the working\n> > tree files.  This patch turns \"a/b\" into \"one/two\".\n> \n> Hmph, but the branch a and the file A _do_ have names that are\n> unrelated to each other, and it is only the case insensitive fs\n> that is confused ;-).  Renaming is not so bad and certainly is\n> not wrong per-se as a workaround, but I have this suspicion\n> that it sends a wrong message to people on such a filesystem,\n> namely, \"you cannot use Git to manage a file called 'master'\",\n> or something silly like that. Disambiguation with double-dashes\n> does not have such a problem, and instead shows a way how\n> scripts that are meant to be portable is written. More importantly,\n> that is more in line with the problem description (i.e. we complain\n> pointing out the ambiguity, implying that everything is fine as long\n> as you disambiguate).\n>\n> \n> So I would rather see the workaround done that way.\n\nMy main concern is that it leaves t1410 in an \"accident waiting to\nhappen\" state, where some hapless developer will add a new test using\na/b and not realizing they need to be careful to disambiguate. The test\nwill pass for them on Linux, but some luckless OS X user will end up\nwasting time tracking down the error.\n\nOr another way of looking at it: it is perfectly possible to have git\nmanage a file called \"master\" or even \"HEAD\". But that does not mean it\nis a _good idea_, or is without annoyances. :)\n\n> But that is only if this were before you actually wrote the patch.\n> The above is not a preference strong enough to make me ask\n> you to reroll ;-)\n\nThe alternate form is quite trivial. I think I still prefer the\n\"one/two\" version, but here is the \"--\" patch for reference. You can\ndecide which to pick up.\n\n-- >8 --\nSubject: t1410: fix breakage on case-insensitive filesystems\n\nTwo tests recently added to t1410 create branches \"a\" and\n\"a/b\" to test d/f conflicts on reflogs. Earlier tests in\nthat script create the path \"A/B\" in the working tree.\nThere's no conflict on a case-sensitive filesystem, but on a\ncase-insensitive one, \"git log\" will complain that \"a/b\" is\nboth a revision and a working tree path.\n\nWe can fix this by using \"--\" to disambiguate.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\n t/t1410-reflog.sh | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/t/t1410-reflog.sh b/t/t1410-reflog.sh\nindex 976c1d4..48bcd59 100755\n--- a/t/t1410-reflog.sh\n+++ b/t/t1410-reflog.sh\n@@ -258,7 +258,7 @@ test_expect_success 'stale dirs do not cause d/f conflicts (reflogs on)' '\n \n \tgit branch a/b master &&\n \techo \"a/b@{0} branch: Created from master\" >expect &&\n-\tgit log -g --format=\"%gd %gs\" a/b >actual &&\n+\tgit log -g --format=\"%gd %gs\" a/b -- >actual &&\n \ttest_cmp expect actual &&\n \tgit branch -d a/b &&\n \n@@ -266,7 +266,7 @@ test_expect_success 'stale dirs do not cause d/f conflicts (reflogs on)' '\n \t# we should move it out of the way to create \"a\" reflog\n \tgit branch a master &&\n \techo \"a@{0} branch: Created from master\" >expect &&\n-\tgit log -g --format=\"%gd %gs\" a >actual &&\n+\tgit log -g --format=\"%gd %gs\" a -- >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -275,7 +275,7 @@ test_expect_success 'stale dirs do not cause d/f conflicts (reflogs off)' '\n \n \tgit branch a/b master &&\n \techo \"a/b@{0} branch: Created from master\" >expect &&\n-\tgit log -g --format=\"%gd %gs\" a/b >actual &&\n+\tgit log -g --format=\"%gd %gs\" a/b -- >actual &&\n \ttest_cmp expect actual &&\n \tgit branch -d a/b &&\n \n@@ -283,7 +283,7 @@ test_expect_success 'stale dirs do not cause d/f conflicts (reflogs off)' '\n \t# it already exists, which it does not\n \tgit -c core.logallrefupdates=false branch a master &&\n \t: >expect &&\n-\tgit log -g --format=\"%gd %gs\" a >actual &&\n+\tgit log -g --format=\"%gd %gs\" a -- >actual &&\n \ttest_cmp expect actual\n '\n \n-- \n2.1.2.596.g7379948\n"},{"id":"251650","messageId":"20141110063035.GA7677@peff.net","threadId":"37909","inReplyTo":"xmqqtx28b6z6.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH] t1410: fix breakage on case-insensitive filesystems","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2014-11-10T06:30:35Z","receivedAt":"2014-11-10T06:30:35Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sun, Nov 09, 2014 at 09:48:29AM -0800, Junio C Hamano wrote:\n\n> Michael Blume <blume.mike@gmail.com> writes:\n> \n> > Works for me, thanks =)\n> >\n> > I'm curious now, is there an automated build of git running on a mac\n> > anywhere? There's a mac mini running jenkins in my office and it's\n> > possible I could convince someone to let me set up a git build that'll\n> > e-mail me if there's a test failure.\n> \n> I am not aware of a Macintosh person who regularly runs tests, but\n> if there were, we hopefully will hear from them soonish ;-).\n\nI think there are several people who run the tests on OS X fairly\nregularly (I note that another fix for the t1410 problem has already\nmaterialized :) ).\n\nHowever, I think it is nice when test failures are caught early, before\nyou have merged topics (to master or elsewhere). That helps isolate the\nfailures to their particular topics.\n\nI know you \"make test\" before pushing out the results of any integration\nyou do. And I recall that for a while (and maybe still?) you even did so\non VMs of a few common platforms. OS X is notoriously irritating to run\nin a VM, but would you be interested in a network-accessible install\nthat you could push to and \"make test\" on as part of your routine?\n\nIf what Michael is offering cannot do that, I am sure I can get GitHub\nto set something up.\n\n-Peff\n"},{"id":"251653","messageId":"CAPc5daUrUZ135sbSuZn6DXmN_momR6KxNyN9cNdTbzwbD6Uu0A@mail.gmail.com","threadId":"37909","inReplyTo":"20141110063035.GA7677@peff.net","subject":"Re: [PATCH] t1410: fix breakage on case-insensitive filesystems","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-11-10T06:47:52Z","receivedAt":"2014-11-10T06:47:52Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"On Sun, Nov 9, 2014 at 10:30 PM, Jeff King <peff@peff.net> wrote:\n>\n> I know you \"make test\" before pushing out the results of any integration\n> you do. And I recall that for a while (and maybe still?) you even did so\n> on VMs of a few common platforms. OS X is notoriously irritating to run\n> in a VM, but would you be interested in a network-accessible install\n> that you could push to and \"make test\" on as part of your routine?\n>\n> If what Michael is offering cannot do that, I am sure I can get GitHub\n> to set something up.\n\nEven if it were network-accessible, the latency for doing an integration\ncycle and pushing there and waiting for the tests to come back may\nmake it impractical to use it as \"part of pre-pushout test\".\n\nBut I would think that the project certainly would benefit if a\npost-receive hook at Github did an automated test on the tip of\n'pu' and bisected a breakage, if found, to pinpoint the patch\nthat breaks. It could even send a notice to the author of the\nnon-portable patch ;-).\n\nThat would be \"post-pushout test\", but as long as it catches new\nbreakages before they hit 'next', the resulting benefit to the project\nwould be very similar (the difference is only one integration cycle).\n"},{"id":"251655","messageId":"20141110070459.GC7677@peff.net","threadId":"37909","inReplyTo":"CAPc5daUrUZ135sbSuZn6DXmN_momR6KxNyN9cNdTbzwbD6Uu0A@mail.gmail.com","subject":"Re: [PATCH] t1410: fix breakage on case-insensitive filesystems","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2014-11-10T07:04:59Z","receivedAt":"2014-11-10T07:04:59Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sun, Nov 09, 2014 at 10:47:52PM -0800, Junio C Hamano wrote:\n\n> On Sun, Nov 9, 2014 at 10:30 PM, Jeff King <peff@peff.net> wrote:\n> >\n> > I know you \"make test\" before pushing out the results of any integration\n> > you do. And I recall that for a while (and maybe still?) you even did so\n> > on VMs of a few common platforms. OS X is notoriously irritating to run\n> > in a VM, but would you be interested in a network-accessible install\n> > that you could push to and \"make test\" on as part of your routine?\n> >\n> > If what Michael is offering cannot do that, I am sure I can get GitHub\n> > to set something up.\n> \n> Even if it were network-accessible, the latency for doing an integration\n> cycle and pushing there and waiting for the tests to come back may\n> make it impractical to use it as \"part of pre-pushout test\".\n\nI had the impression you were already doing \"for i in my_vms; do git\npush $i && ssh $i make test; done\", so in theory this could be done in\nparallel. But yeah, I definitely wouldn't want to add latency to your\nworkflow.\n\n> But I would think that the project certainly would benefit if a\n> post-receive hook at Github did an automated test on the tip of\n> 'pu' and bisected a breakage, if found, to pinpoint the patch\n> that breaks. It could even send a notice to the author of the\n> non-portable patch ;-).\n\nYeah, you're right. Testing on \"pu\" is probably enough. Coupled with\nautomated bisection, the \"pinpointing\" part is not that important, and\npu is often \"early enough\" to catch problems before people try to build\non top of them. So I think if Michael is still willing to set up his\nbuild box, just pulling and building your \"pu\" automatically would be a\ngood start.\n\nGitHub supports trigger hooks on pushes, but I do not think that is even\nnecessary here. Just polling once or twice a day would probably give us\ngood enough turn-around time.\n\nI think somebody just needs to write the auto-bisect script. I suspect\nthe simplest form is something like:\n\n  # fetch a new version; exit early if we already checked this one\n  git fetch\n  test \"$(git rev-parse pu-ok)\" = \"$(git rev-parse origin/pu)\" &&exit 0\n  git reset --hard origin/pu\n\n  # quick path: all tests succeed\n  if make test; then\n    git tag -f pu-ok HEAD\n    exit 0\n  fi\n\n  # slow path: bisect the actual commit. We do not need worry about\n  # cutting each bisection step down to the minimal size (e.g., finding\n  # the actual failing test), because this should run only infrequently.\n  git bisect start HEAD pu-ok\n  git bisect run make test\n\nThe real work would be in wrapping it up in a cron-job or similar so\nthat it produces no output on success, and sends an email (or whatever)\nwith the bisect results when it fails.\n\n-Peff\n"},{"id":"251770","messageId":"5463C106.5090803@kdbg.org","threadId":"37909","inReplyTo":"20141109015918.GA24736@peff.net","subject":"Re: [PATCH] t1410: fix breakage on case-insensitive filesystems","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2014-11-12T20:20:22Z","receivedAt":"2014-11-12T20:20:22Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 09.11.2014 um 02:59 schrieb Jeff King:\n>  test_expect_success 'stale dirs do not cause d/f conflicts (reflogs off)' '\n> -\ttest_when_finished \"git branch -d a || git branch -d a/b\" &&\n> +\ttest_when_finished \"git branch -d one || git branch -d one/two\" &&\n>  \n> -\tgit branch a/b master &&\n> -\techo \"a/b@{0} branch: Created from master\" >expect &&\n> -\tgit log -g --format=\"%gd %gs\" a/b >actual &&\n> +\tgit branch one/two master &&\n> +\techo \"one/two@{0} branch: Created from master\" >expect &&\n> +\tgit log -g --format=\"%gd %gs\" one/two >actual &&\n>  \ttest_cmp expect actual &&\n> -\tgit branch -d a/b &&\n> +\tgit branch -d one/two &&\n>  \n> -\t# same as before, but we only create a reflog for \"a\" if\n> +\t# same as before, but we only create a reflog for \"one\" if\n>  \t# it already exists, which it does not\n> -\tgit -c core.logallrefupdates=false branch a master &&\n> +\tgit -c core.logallrefupdates=false branch one master &&\n>  \t: >expect &&\n> -\tgit log -g --format=\"%gd %gs\" a >actual &&\n> +\tgit log -g --format=\"%gd %gs\" one >actual &&\n>  \ttest_cmp expect actual\n>  '\n>  \n\nOn Linux I observe\n\nDeleted branch one/two (was b60a214).\nwarning: unable to unlink .git/logs/refs/heads/one: Is a directory\nDeleted branch one (was b60a214).\nok 15 - stale dirs do not cause d/f conflicts (reflogs off)\n\n(notice the warning) but on Windows the test fails with\n\nDeleted branch one/two (was b60a214).\nerror: Unable to append to .git/logs/refs/heads/one: Permission denied\nfatal: Cannot update the ref 'refs/heads/one'.\nnot ok 15 - stale dirs do not cause d/f conflicts (reflogs off)\n\nOn both systems, .git/logs/refs/heads/one exists as an empty directory\nafter the test.\n\nI haven't dug further (will have to wait a day or two, so if you have\ntime or a hint where to look...)\n\n-- Hannes\n"},{"id":"251778","messageId":"20141112215923.GB6801@peff.net","threadId":"37909","inReplyTo":"5463C106.5090803@kdbg.org","subject":"Re: [PATCH] t1410: fix breakage on case-insensitive filesystems","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2014-11-12T21:59:23Z","receivedAt":"2014-11-12T21:59:23Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Nov 12, 2014 at 09:20:22PM +0100, Johannes Sixt wrote:\n\n> Am 09.11.2014 um 02:59 schrieb Jeff King:\n> >  test_expect_success 'stale dirs do not cause d/f conflicts (reflogs off)' '\n> > -\ttest_when_finished \"git branch -d a || git branch -d a/b\" &&\n> > +\ttest_when_finished \"git branch -d one || git branch -d one/two\" &&\n> >  \n> > -\tgit branch a/b master &&\n> > -\techo \"a/b@{0} branch: Created from master\" >expect &&\n> > -\tgit log -g --format=\"%gd %gs\" a/b >actual &&\n> > +\tgit branch one/two master &&\n> > +\techo \"one/two@{0} branch: Created from master\" >expect &&\n> > +\tgit log -g --format=\"%gd %gs\" one/two >actual &&\n> >  \ttest_cmp expect actual &&\n> > -\tgit branch -d a/b &&\n> > +\tgit branch -d one/two &&\n> >  \n> > -\t# same as before, but we only create a reflog for \"a\" if\n> > +\t# same as before, but we only create a reflog for \"one\" if\n> >  \t# it already exists, which it does not\n> > -\tgit -c core.logallrefupdates=false branch a master &&\n> > +\tgit -c core.logallrefupdates=false branch one master &&\n> >  \t: >expect &&\n> > -\tgit log -g --format=\"%gd %gs\" a >actual &&\n> > +\tgit log -g --format=\"%gd %gs\" one >actual &&\n> >  \ttest_cmp expect actual\n> >  '\n> >  \n> \n> On Linux I observe\n> \n> Deleted branch one/two (was b60a214).\n> warning: unable to unlink .git/logs/refs/heads/one: Is a directory\n> Deleted branch one (was b60a214).\n> ok 15 - stale dirs do not cause d/f conflicts (reflogs off)\n> \n> (notice the warning)\n\nYes, this is expected. The warning actually comes from the \"git branch\n-d\" run during cleanup. Branch \"one\" exists but has no reflog. Instead\nthere is a crufty dir call \"logs/refs/heads/one\". The deletion process\nblindly calls \"unlink\" on it and complains when it fails for reasons\nother than ENOENT.\n\nWe could suppress that warning, but I didn't think it was really worth\nthe bother. This is such a funny setup (reflogs on, then off, then on,\n_and_ a d/f conflict in the branches) that I doubt it will come up much.\n\nI seem to recall that ancient versions of SunOS used to do bad things\nwhen you called \"unlink\" on a directory, but I do not know if that is\nstill the case (I also would doubt this is the only place in git where\nwe blindly do an \"unlink if you can\" without actually checking the file.\n\n> but on Windows the test fails with\n> \n> Deleted branch one/two (was b60a214).\n> error: Unable to append to .git/logs/refs/heads/one: Permission denied\n> fatal: Cannot update the ref 'refs/heads/one'.\n> not ok 15 - stale dirs do not cause d/f conflicts (reflogs off)\n\nThat looks more like it is failing the actual test (i.e., the creation\nof branch \"one\" when there is cruft in the reflog). My guess is that\ncalling open() on a directory is giving us EACCES instead of EISDIR. Can\nyou verify that?\n\nIf that is the case, then this isn't a new breakage, I think, but just\ncode we weren't previously exercising. It would be interesting to know\nwhether:\n\n  git config core.logallrefupdates true\n  git branch one/two\n  git branch -d one/two\n  git branch one\n\nworks (even without my patch). If so, then there's probably something\nelse going on.\n\nThe relevant bits are in log_ref_setup. We try to open() once, and\naccept EISDIR as a hint that we may need to remove an empty directory\nand try again. If Windows gives us EACCES, then we may need to have that\ntrigger the same code.\n\n-Peff\n"},{"id":"251791","messageId":"546470D0.3080809@kdbg.org","threadId":"37909","inReplyTo":"20141112215923.GB6801@peff.net","subject":"Re: [PATCH] t1410: fix breakage on case-insensitive filesystems","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2014-11-13T08:50:24Z","receivedAt":"2014-11-13T08:50:24Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 12.11.2014 22:59, schrieb Jeff King:\n> On Wed, Nov 12, 2014 at 09:20:22PM +0100, Johannes Sixt wrote:\n>\n>> Am 09.11.2014 um 02:59 schrieb Jeff King:\n>>>   test_expect_success 'stale dirs do not cause d/f conflicts (reflogs off)' '\n>>> -\ttest_when_finished \"git branch -d a || git branch -d a/b\" &&\n>>> +\ttest_when_finished \"git branch -d one || git branch -d one/two\" &&\n>>>\n>>> -\tgit branch a/b master &&\n>>> -\techo \"a/b@{0} branch: Created from master\" >expect &&\n>>> -\tgit log -g --format=\"%gd %gs\" a/b >actual &&\n>>> +\tgit branch one/two master &&\n>>> +\techo \"one/two@{0} branch: Created from master\" >expect &&\n>>> +\tgit log -g --format=\"%gd %gs\" one/two >actual &&\n>>>   \ttest_cmp expect actual &&\n>>> -\tgit branch -d a/b &&\n>>> +\tgit branch -d one/two &&\n>>>\n>>> -\t# same as before, but we only create a reflog for \"a\" if\n>>> +\t# same as before, but we only create a reflog for \"one\" if\n>>>   \t# it already exists, which it does not\n>>> -\tgit -c core.logallrefupdates=false branch a master &&\n>>> +\tgit -c core.logallrefupdates=false branch one master &&\n>>>   \t: >expect &&\n>>> -\tgit log -g --format=\"%gd %gs\" a >actual &&\n>>> +\tgit log -g --format=\"%gd %gs\" one >actual &&\n>>>   \ttest_cmp expect actual\n>>>   '\n>>>\n>>\n>> On Linux I observe\n>>\n>> Deleted branch one/two (was b60a214).\n>> warning: unable to unlink .git/logs/refs/heads/one: Is a directory\n>> Deleted branch one (was b60a214).\n>> ok 15 - stale dirs do not cause d/f conflicts (reflogs off)\n>>\n>> (notice the warning)\n>\n> Yes, this is expected. The warning actually comes from the \"git branch\n> -d\" run during cleanup. Branch \"one\" exists but has no reflog. Instead\n> there is a crufty dir call \"logs/refs/heads/one\". The deletion process\n> blindly calls \"unlink\" on it and complains when it fails for reasons\n> other than ENOENT.\n>\n> We could suppress that warning, but I didn't think it was really worth\n> the bother. This is such a funny setup (reflogs on, then off, then on,\n> _and_ a d/f conflict in the branches) that I doubt it will come up much.\n>\n> I seem to recall that ancient versions of SunOS used to do bad things\n> when you called \"unlink\" on a directory, but I do not know if that is\n> still the case (I also would doubt this is the only place in git where\n> we blindly do an \"unlink if you can\" without actually checking the file.\n>\n>> but on Windows the test fails with\n>>\n>> Deleted branch one/two (was b60a214).\n>> error: Unable to append to .git/logs/refs/heads/one: Permission denied\n>> fatal: Cannot update the ref 'refs/heads/one'.\n>> not ok 15 - stale dirs do not cause d/f conflicts (reflogs off)\n>\n> That looks more like it is failing the actual test (i.e., the creation\n> of branch \"one\" when there is cruft in the reflog). My guess is that\n> calling open() on a directory is giving us EACCES instead of EISDIR. Can\n> you verify that?\n>\n> If that is the case, then this isn't a new breakage, I think, but just\n> code we weren't previously exercising. It would be interesting to know\n> whether:\n>\n>    git config core.logallrefupdates true\n>    git branch one/two\n>    git branch -d one/two\n>    git branch one\n>\n> works (even without my patch). If so, then there's probably something\n> else going on.\n\nDon't know what you mean with \"my patch\" (the one I was responding to \ntouches only t1410). But the sequence works as expected with a version \nbuilt in September:\n\nC:\\Temp\\gittest>git init\nInitialized empty Git repository in C:/Temp/gittest/.git/\n\nC:\\Temp\\gittest>git commit --allow-empty -m init\n[master (root-commit) 2e78994] init\n\nC:\\Temp\\gittest>git branch one/two\n\nC:\\Temp\\gittest>git branch -d one/two\nDeleted branch one/two (was 2e78994).\n\nC:\\Temp\\gittest>git branch one\n\nC:\\Temp\\gittest>git version\ngit version 2.1.0.rc2.1268.g12ef091\n\n> The relevant bits are in log_ref_setup. We try to open() once, and\n> accept EISDIR as a hint that we may need to remove an empty directory\n> and try again. If Windows gives us EACCES, then we may need to have that\n> trigger the same code.\n\nThanks, that is a starting point.\n\n-- Hannes\n"},{"id":"251792","messageId":"20141113090832.GA8329@peff.net","threadId":"37909","inReplyTo":"546470D0.3080809@kdbg.org","subject":"Re: [PATCH] t1410: fix breakage on case-insensitive filesystems","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2014-11-13T09:08:32Z","receivedAt":"2014-11-13T09:08:32Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Nov 13, 2014 at 09:50:24AM +0100, Johannes Sixt wrote:\n\n> >That looks more like it is failing the actual test (i.e., the creation\n> >of branch \"one\" when there is cruft in the reflog). My guess is that\n> >calling open() on a directory is giving us EACCES instead of EISDIR. Can\n> >you verify that?\n> >\n> >If that is the case, then this isn't a new breakage, I think, but just\n> >code we weren't previously exercising. It would be interesting to know\n> >whether:\n> >\n> >   git config core.logallrefupdates true\n> >   git branch one/two\n> >   git branch -d one/two\n> >   git branch one\n> >\n> >works (even without my patch). If so, then there's probably something\n> >else going on.\n> \n> Don't know what you mean with \"my patch\" (the one I was responding to\n> touches only t1410).\n\nThe patch you are responding to is a fix-up for 9233887, which tweaked\nthe code and added those tests in the first place (I doubt it would work\nfor you, though, as it has a problem on case-insensitive filesystems).\n\n> But the sequence works as expected with a version built\n> in September:\n\nHmph. So that would mean my theory is not right. Or maybe I am not\naccounting for something else in my analysis.\n\nI guess it is odd that the test right before the failing one passes (it\nis basically that same sequence, with reflogs turned on for both\noperations), which implies that we are properly getting EISDIR. The only\ndifference in the failing test is that reflogs are turned off for the\n\"git branch one\" operation. But I cannot see why that would be broken if\nthe other one passes.\n\nI wish it were easy for me to ssh into a Windows VM and run gdb. ;)\n\n-Peff\n"},{"id":"251823","messageId":"xmqqy4rf2hd9.fsf@gitster.dls.corp.google.com","threadId":"37909","inReplyTo":"20141113090832.GA8329@peff.net","subject":"Re: [PATCH] t1410: fix breakage on case-insensitive filesystems","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-11-13T16:30:10Z","receivedAt":"2014-11-13T16:30:10Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> The patch you are responding to is a fix-up for 9233887, which tweaked\n> the code and added those tests in the first place (I doubt it would work\n> for you, though, as it has a problem on case-insensitive filesystems).\n>\n>> But the sequence works as expected with a version built\n>> in September:\n>\n> Hmph. So that would mean my theory is not right. Or maybe I am not\n> accounting for something else in my analysis.\n>\n> I guess it is odd that the test right before the failing one passes (it\n> is basically that same sequence, with reflogs turned on for both\n> operations), which implies that we are properly getting EISDIR. The only\n> difference in the failing test is that reflogs are turned off for the\n> \"git branch one\" operation. But I cannot see why that would be broken if\n> the other one passes.\n\nHmph, or perhaps \"branch -d one/two\" fails to remove the reflog and\ndoes not notice the failure?  But creation of \"one\" with reflog\ndisabled shouldn't be affected in such a case, either.  Puzzled...\n\n> I wish it were easy for me to ssh into a Windows VM and run gdb. ;)\n\nlikewise.\n"},{"id":"251893","messageId":"546653D6.7040505@kdbg.org","threadId":"37909","inReplyTo":"20141113090832.GA8329@peff.net","subject":"Re: [PATCH] t1410: fix breakage on case-insensitive filesystems","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2014-11-14T19:11:18Z","receivedAt":"2014-11-14T19:11:18Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"(+cc msysgit)\n\nAm 13.11.2014 um 10:08 schrieb Jeff King:\n> On Thu, Nov 13, 2014 at 09:50:24AM +0100, Johannes Sixt wrote:\n> \n>>> That looks more like it is failing the actual test (i.e., the creation\n>>> of branch \"one\" when there is cruft in the reflog). My guess is that\n>>> calling open() on a directory is giving us EACCES instead of EISDIR. Can\n>>> you verify that?\n\nThat is indeed the case. It's an ancient bug in our wrapper\nmingw_open().\n\n>>> If that is the case, then this isn't a new breakage, I think, but just\n>>> code we weren't previously exercising. It would be interesting to know\n>>> whether:\n>>>\n>>>   git config core.logallrefupdates true\n>>>   git branch one/two\n>>>   git branch -d one/two\n>>>   git branch one\n>>>\n>>> works (even without my patch). If so, then there's probably something\n>>> else going on.\n>>\n>> Don't know what you mean with \"my patch\" (the one I was responding to\n>> touches only t1410).\n> \n> The patch you are responding to is a fix-up for 9233887, which tweaked\n> the code and added those tests in the first place (I doubt it would work\n> for you, though, as it has a problem on case-insensitive filesystems).\n> \n>> But the sequence works as expected with a version built\n>> in September:\n> \n> Hmph. So that would mean my theory is not right. Or maybe I am not\n> accounting for something else in my analysis.\n> \n> I guess it is odd that the test right before the failing one passes (it\n> is basically that same sequence, with reflogs turned on for both\n> operations), which implies that we are properly getting EISDIR. The only\n> difference in the failing test is that reflogs are turned off for the\n> \"git branch one\" operation. But I cannot see why that would be broken if\n> the other one passes.\n\nNot a comment, on this paragraph of yours, but while I was walking\nthrough the code with gdb, I was wondering why the reflog directory is\nbeing touched at all when core.logallrefupdates is off (in\nlog_ref_setup via log_ref_write). With the patch below I now get the\nsame unlink warning as on Linux.\n\n--- 8< ---\nSubject: [PATCH] Windows: correct detection of EISDIR in mingw_open()\n\nAccording to the Linux open(2) man page, open() returns EISDIR if a\ndirectory was attempted to be opened for writing. Our emulation in\nmingw_open() does not get this right: it checks only for O_CREAT. Fix\nit to check for one of the write flags.\n\nThis fixes a failure in reflog handling, which opens files with\nO_APPEND|O_WRONLY, but without O_CREAT, and expects EISDIR when the\nnamed file happens to be a directory.\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\n---\n compat/mingw.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/compat/mingw.c b/compat/mingw.c\nindex 2ee3fe3..fc64b73 100644\n--- a/compat/mingw.c\n+++ b/compat/mingw.c\n@@ -312,7 +312,7 @@ int mingw_open (const char *filename, int oflags, ...)\n \t\treturn -1;\n \tfd = _wopen(wfilename, oflags, mode);\n \n-\tif (fd < 0 && (oflags & O_CREAT) && errno == EACCES) {\n+\tif (fd < 0 && (oflags & (O_WRONLY|O_RDWR)) && errno == EACCES) {\n \t\tDWORD attrs = GetFileAttributesW(wfilename);\n \t\tif (attrs != INVALID_FILE_ATTRIBUTES && (attrs & FILE_ATTRIBUTE_DIRECTORY))\n \t\t\terrno = EISDIR;\n-- \n2.0.0.12.gbcf935e\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"251895","messageId":"20141114192308.GA10860@peff.net","threadId":"37909","inReplyTo":"546653D6.7040505@kdbg.org","subject":"Re: [PATCH] t1410: fix breakage on case-insensitive filesystems","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2014-11-14T19:23:08Z","receivedAt":"2014-11-14T19:23:08Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Nov 14, 2014 at 08:11:18PM +0100, Johannes Sixt wrote:\n\n> Not a comment, on this paragraph of yours, but while I was walking\n> through the code with gdb, I was wondering why the reflog directory is\n> being touched at all when core.logallrefupdates is off (in\n> log_ref_setup via log_ref_write). With the patch below I now get the\n> same unlink warning as on Linux.\n\nIt's because of the weird reflog rules: we will use a reflog file that\nexists (no matter what core.logallrefupdates says), but only _create_ a\nnew one if the config tells us to. I think this dates back to the origin\nof reflogs, where we weren't sure at first that you would always want\nthem on.\n\n> --- 8< ---\n> Subject: [PATCH] Windows: correct detection of EISDIR in mingw_open()\n> \n> According to the Linux open(2) man page, open() returns EISDIR if a\n> directory was attempted to be opened for writing. Our emulation in\n> mingw_open() does not get this right: it checks only for O_CREAT. Fix\n> it to check for one of the write flags.\n> \n> This fixes a failure in reflog handling, which opens files with\n> O_APPEND|O_WRONLY, but without O_CREAT, and expects EISDIR when the\n> named file happens to be a directory.\n\nAh, so we do get EISDIR with O_CREAT. Which explains why the first test\npassed and the second failed (we only pass O_CREAT when logallrefupdates\nis on). The behavior you saw (and this fix) make perfect sense to me\nthen.\n\n> Signed-off-by: Johannes Sixt <j6t@kdbg.org>\n\nI am not sure if I get to Acked-by things in compat/mingw, but I am\npretty sure this is the right fix. :)\n\n-Peff\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"251903","messageId":"xmqqoas935zc.fsf@gitster.dls.corp.google.com","threadId":"37909","inReplyTo":"546653D6.7040505@kdbg.org","subject":"Re: [PATCH] t1410: fix breakage on case-insensitive filesystems","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-11-14T20:03:03Z","receivedAt":"2014-11-14T20:03:03Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Sixt <j6t@kdbg.org> writes:\n\n> Not a comment, on this paragraph of yours, but while I was walking\n> through the code with gdb, I was wondering why the reflog directory is\n> being touched at all when core.logallrefupdates is off (in\n> log_ref_setup via log_ref_write). With the patch below I now get the\n> same unlink warning as on Linux.\n\nI do not do Windows, but your analysis feels really sound and\nexplains the symptom well, and the change looks like the right fix\nto the issue.\n\nThanks.\n\n> --- 8< ---\n> Subject: [PATCH] Windows: correct detection of EISDIR in mingw_open()\n>\n> According to the Linux open(2) man page, open() returns EISDIR if a\n> directory was attempted to be opened for writing. Our emulation in\n> mingw_open() does not get this right: it checks only for O_CREAT. Fix\n> it to check for one of the write flags.\n>\n> This fixes a failure in reflog handling, which opens files with\n> O_APPEND|O_WRONLY, but without O_CREAT, and expects EISDIR when the\n> named file happens to be a directory.\n>\n> Signed-off-by: Johannes Sixt <j6t@kdbg.org>\n> ---\n>  compat/mingw.c | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/compat/mingw.c b/compat/mingw.c\n> index 2ee3fe3..fc64b73 100644\n> --- a/compat/mingw.c\n> +++ b/compat/mingw.c\n> @@ -312,7 +312,7 @@ int mingw_open (const char *filename, int oflags, ...)\n>  \t\treturn -1;\n>  \tfd = _wopen(wfilename, oflags, mode);\n>  \n> -\tif (fd < 0 && (oflags & O_CREAT) && errno == EACCES) {\n> +\tif (fd < 0 && (oflags & (O_WRONLY|O_RDWR)) && errno == EACCES) {\n>  \t\tDWORD attrs = GetFileAttributesW(wfilename);\n>  \t\tif (attrs != INVALID_FILE_ATTRIBUTES && (attrs & FILE_ATTRIBUTE_DIRECTORY))\n>  \t\t\terrno = EISDIR;\n> -- \n> 2.0.0.12.gbcf935e\n>\n> -- \n"},{"id":"251912","messageId":"87zjbtlcj0.fsf@igel.home","threadId":"37909","inReplyTo":"546653D6.7040505@kdbg.org","subject":"Re: [PATCH] t1410: fix breakage on case-insensitive filesystems","fromName":"Andreas Schwab","fromEmail":"schwab@linux-m68k.org","sentAt":"2014-11-14T21:04:19Z","receivedAt":"2014-11-14T21:04:19Z","isPatch":true,"sender":{"key":"schwab@linux-m68k.org","avatar":"https://avatars.githubusercontent.com/u/2175493?v=4"},"body":"Johannes Sixt <j6t@kdbg.org> writes:\n\n> diff --git a/compat/mingw.c b/compat/mingw.c\n> index 2ee3fe3..fc64b73 100644\n> --- a/compat/mingw.c\n> +++ b/compat/mingw.c\n> @@ -312,7 +312,7 @@ int mingw_open (const char *filename, int oflags, ...)\n>  \t\treturn -1;\n>  \tfd = _wopen(wfilename, oflags, mode);\n>  \n> -\tif (fd < 0 && (oflags & O_CREAT) && errno == EACCES) {\n> +\tif (fd < 0 && (oflags & (O_WRONLY|O_RDWR)) && errno == EACCES) {\n\nO_WRONLY and O_RDWR aren't flags, but two values of a 2-bit field\n(O_ACCMODE).\n\nAndreas.\n\n-- \nAndreas Schwab, schwab@linux-m68k.org\nGPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5\n\"And now for something completely different.\"\n"},{"id":"251937","messageId":"54670E8E.5040901@kdbg.org","threadId":"37909","inReplyTo":"87zjbtlcj0.fsf@igel.home","subject":"Re: [PATCH] t1410: fix breakage on case-insensitive filesystems","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2014-11-15T08:27:58Z","receivedAt":"2014-11-15T08:27:58Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 14.11.2014 um 22:04 schrieb Andreas Schwab:\n> Johannes Sixt <j6t@kdbg.org> writes:\n> \n>> diff --git a/compat/mingw.c b/compat/mingw.c\n>> index 2ee3fe3..fc64b73 100644\n>> --- a/compat/mingw.c\n>> +++ b/compat/mingw.c\n>> @@ -312,7 +312,7 @@ int mingw_open (const char *filename, int oflags, ...)\n>>  \t\treturn -1;\n>>  \tfd = _wopen(wfilename, oflags, mode);\n>>  \n>> -\tif (fd < 0 && (oflags & O_CREAT) && errno == EACCES) {\n>> +\tif (fd < 0 && (oflags & (O_WRONLY|O_RDWR)) && errno == EACCES) {\n> \n> O_WRONLY and O_RDWR aren't flags, but two values of a 2-bit field\n> (O_ACCMODE).\n\nHrm... I wondered why O_RDONLY can be zero. If I find O_ACCMODE on\nWindows, I'll use it, otherwise, the patch as is will have to do - we\ndon't have to be particularly portable in this corner of the code.\n\n-- Hannes\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"251969","messageId":"546911D2.6060007@kdbg.org","threadId":"37909","inReplyTo":"54670E8E.5040901@kdbg.org","subject":"[PATCH v2] Windows: correct detection of EISDIR in mingw_open()","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2014-11-16T21:06:26Z","receivedAt":"2014-11-16T21:06:26Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"According to the Linux open(2) man page, open() returns EISDIR if a\ndirectory was attempted to be opened for writing. Our emulation in\nmingw_open() does not get this right: it checks only for O_CREAT. Fix\nit to check for a write request.\n\nThis fixes a failure in reflog handling, which opens files with\nO_APPEND|O_WRONLY, but without O_CREAT, and expects EISDIR when the\nnamed file happens to be a directory.\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\n---\n This version of the patch uses O_ACCMODE.\n\n compat/mingw.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/compat/mingw.c b/compat/mingw.c\nindex 2ee3fe3..c702731 100644\n--- a/compat/mingw.c\n+++ b/compat/mingw.c\n@@ -312,7 +312,7 @@ int mingw_open (const char *filename, int oflags, ...)\n \t\treturn -1;\n \tfd = _wopen(wfilename, oflags, mode);\n \n-\tif (fd < 0 && (oflags & O_CREAT) && errno == EACCES) {\n+\tif (fd < 0 && (oflags & O_ACCMODE) != O_RDONLY && errno == EACCES) {\n \t\tDWORD attrs = GetFileAttributesW(wfilename);\n \t\tif (attrs != INVALID_FILE_ATTRIBUTES && (attrs & FILE_ATTRIBUTE_DIRECTORY))\n \t\t\terrno = EISDIR;\n-- \n2.0.0.12.gbcf935e\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"}]}