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>
Jeff King committed
Nov 8, 2014 at 20:59 UTC
aae828b911e7c0285f10476d42758101825b9add
1 file changed
+18
-18
t/t1410-reflog.sh
+18
-18
@@ -246,36 +246,36 @@ test_expect_success 'gc.reflogexpire=false' '
246
'
247
248
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" &&
250
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 &&
254
test_cmp expect actual &&
255
- git branch -d a/b &&
255
+ git branch -d one/two &&
256
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 &&
262
test_cmp expect actual
263
'
264
265
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" &&
267
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 &&
271
test_cmp expect actual &&
272
- git branch -d a/b &&
272
+ git branch -d one/two &&
273
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
275
# 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 &&
277
: >expect &&
278
- git log -g --format="%gd %gs" a >actual &&
278
+ git log -g --format="%gd %gs" one >actual &&
279
test_cmp expect actual
280
'
281