Skip to content

Commit aae828b

Browse files
peffgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9233887 commit aae828b

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

t/t1410-reflog.sh

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -246,36 +246,36 @@ test_expect_success 'gc.reflogexpire=false' '
246246
'
247247

248248
test_expect_success 'stale dirs do not cause d/f conflicts (reflogs on)' '
249-
test_when_finished "git branch -d a || git branch -d a/b" &&
249+
test_when_finished "git branch -d one || git branch -d one/two" &&
250250
251-
git branch a/b master &&
252-
echo "a/b@{0} branch: Created from master" >expect &&
253-
git log -g --format="%gd %gs" a/b >actual &&
251+
git branch one/two master &&
252+
echo "one/two@{0} branch: Created from master" >expect &&
253+
git log -g --format="%gd %gs" one/two >actual &&
254254
test_cmp expect actual &&
255-
git branch -d a/b &&
255+
git branch -d one/two &&
256256
257-
# now logs/refs/heads/a is a stale directory, but
258-
# we should move it out of the way to create "a" reflog
259-
git branch a master &&
260-
echo "a@{0} branch: Created from master" >expect &&
261-
git log -g --format="%gd %gs" a >actual &&
257+
# now logs/refs/heads/one is a stale directory, but
258+
# we should move it out of the way to create "one" reflog
259+
git branch one master &&
260+
echo "one@{0} branch: Created from master" >expect &&
261+
git log -g --format="%gd %gs" one >actual &&
262262
test_cmp expect actual
263263
'
264264

265265
test_expect_success 'stale dirs do not cause d/f conflicts (reflogs off)' '
266-
test_when_finished "git branch -d a || git branch -d a/b" &&
266+
test_when_finished "git branch -d one || git branch -d one/two" &&
267267
268-
git branch a/b master &&
269-
echo "a/b@{0} branch: Created from master" >expect &&
270-
git log -g --format="%gd %gs" a/b >actual &&
268+
git branch one/two master &&
269+
echo "one/two@{0} branch: Created from master" >expect &&
270+
git log -g --format="%gd %gs" one/two >actual &&
271271
test_cmp expect actual &&
272-
git branch -d a/b &&
272+
git branch -d one/two &&
273273
274-
# same as before, but we only create a reflog for "a" if
274+
# same as before, but we only create a reflog for "one" if
275275
# it already exists, which it does not
276-
git -c core.logallrefupdates=false branch a master &&
276+
git -c core.logallrefupdates=false branch one master &&
277277
: >expect &&
278-
git log -g --format="%gd %gs" a >actual &&
278+
git log -g --format="%gd %gs" one >actual &&
279279
test_cmp expect actual
280280
'
281281

0 commit comments

Comments
 (0)