summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2014-11-09 01:59:18 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-11-10 17:38:53 (GMT)
commitaae828b911e7c0285f10476d42758101825b9add (patch)
treea5ddd8dae462443e7743d7c1dda151597ac97a80 /t
parent9233887cce8eaebd8469315622b84bd26910351f (diff)
downloadgit-aae828b911e7c0285f10476d42758101825b9add.zip
git-aae828b911e7c0285f10476d42758101825b9add.tar.gz
git-aae828b911e7c0285f10476d42758101825b9add.tar.bz2
t1410: fix breakage on case-insensitive filesystems
Two tests recently added to t1410 create branches "a" and "a/b" to test d/f conflicts on reflogs. Earlier, unrelated tests in that script create the path "A/B" in the working tree. There's no conflict on a case-sensitive filesystem, but on a case-insensitive one, "git log" will complain that "a/b" is both a revision and a working tree path. We could fix this by using a "--" to disambiguate, but we are probably better off using names that are less confusing to make it more clear that they are unrelated to the working tree files. This patch turns "a/b" into "one/two". Reported-by: Michael Blume <blume.mike@gmail.com> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t1410-reflog.sh36
1 files changed, 18 insertions, 18 deletions
diff --git a/t/t1410-reflog.sh b/t/t1410-reflog.sh
index e4409e3..3b657c4 100755
--- a/t/t1410-reflog.sh
+++ b/t/t1410-reflog.sh
@@ -246,36 +246,36 @@ test_expect_success 'gc.reflogexpire=false' '
'
test_expect_success 'stale dirs do not cause d/f conflicts (reflogs on)' '
- test_when_finished "git branch -d a || git branch -d a/b" &&
+ test_when_finished "git branch -d one || git branch -d one/two" &&
- git branch a/b master &&
- echo "a/b@{0} branch: Created from master" >expect &&
- git log -g --format="%gd %gs" a/b >actual &&
+ git branch one/two master &&
+ echo "one/two@{0} branch: Created from master" >expect &&
+ git log -g --format="%gd %gs" one/two >actual &&
test_cmp expect actual &&
- git branch -d a/b &&
+ git branch -d one/two &&
- # now logs/refs/heads/a is a stale directory, but
- # we should move it out of the way to create "a" reflog
- git branch a master &&
- echo "a@{0} branch: Created from master" >expect &&
- git log -g --format="%gd %gs" a >actual &&
+ # now logs/refs/heads/one is a stale directory, but
+ # we should move it out of the way to create "one" reflog
+ git branch one master &&
+ echo "one@{0} branch: Created from master" >expect &&
+ git log -g --format="%gd %gs" one >actual &&
test_cmp expect actual
'
test_expect_success 'stale dirs do not cause d/f conflicts (reflogs off)' '
- test_when_finished "git branch -d a || git branch -d a/b" &&
+ test_when_finished "git branch -d one || git branch -d one/two" &&
- git branch a/b master &&
- echo "a/b@{0} branch: Created from master" >expect &&
- git log -g --format="%gd %gs" a/b >actual &&
+ git branch one/two master &&
+ echo "one/two@{0} branch: Created from master" >expect &&
+ git log -g --format="%gd %gs" one/two >actual &&
test_cmp expect actual &&
- git branch -d a/b &&
+ git branch -d one/two &&
- # same as before, but we only create a reflog for "a" if
+ # same as before, but we only create a reflog for "one" if
# it already exists, which it does not
- git -c core.logallrefupdates=false branch a master &&
+ git -c core.logallrefupdates=false branch one master &&
: >expect &&
- git log -g --format="%gd %gs" a >actual &&
+ git log -g --format="%gd %gs" one >actual &&
test_cmp expect actual
'