t6019: avoid refname collision on case-insensitive systems

The criss-cross tests kept failing for me because of collisions of 'a' with 'A' etc. Prefix the lowercase refnames with an extra letter to disambiguate. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Acked-by: Brad King <brad.king@kitware.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Thomas Rast committed Sep 15, 2011 at 10:34 UTC c05b988a69c10d7eef2f34932eed61923c18b4a5
1 file changed +11 -8
t/t6019-rev-list-ancestry-path.sh
+11 -8
@@ -75,33 +75,36 @@ test_expect_success 'rev-list --ancestry-patch D..M -- M.t' '
75 # a X
76 # \ / \
77 # c---cb
78 +#
79 +# All refnames prefixed with 'x' to avoid confusion with the tags
80 +# generated by test_commit on case-insensitive systems.
81 test_expect_success 'setup criss-cross' '
82 mkdir criss-cross &&
83 (cd criss-cross &&
84 git init &&
85 test_commit A &&
83 - git checkout -b b master &&
86 + git checkout -b xb master &&
87 test_commit B &&
85 - git checkout -b c master &&
88 + git checkout -b xc master &&
89 test_commit C &&
87 - git checkout -b bc b -- &&
88 - git merge c &&
89 - git checkout -b cb c -- &&
90 - git merge b &&
90 + git checkout -b xbc xb -- &&
91 + git merge xc &&
92 + git checkout -b xcb xc -- &&
93 + git merge xb &&
94 git checkout master)
95 '
96
97 # no commits in bc descend from cb
98 test_expect_success 'criss-cross: rev-list --ancestry-path cb..bc' '
99 (cd criss-cross &&
97 - git rev-list --ancestry-path cb..bc > actual &&
100 + git rev-list --ancestry-path xcb..xbc > actual &&
101 test -z "$(cat actual)")
102 '
103
104 # no commits in repository descend from cb
105 test_expect_success 'criss-cross: rev-list --ancestry-path --all ^cb' '
106 (cd criss-cross &&
104 - git rev-list --ancestry-path --all ^cb > actual &&
107 + git rev-list --ancestry-path --all ^xcb > actual &&
108 test -z "$(cat actual)")
109 '
110