Skip to content

Commit c05b988

Browse files
trastgitster
authored andcommitted
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 <[email protected]> Acked-by: Brad King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent c3502fa commit c05b988

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

t/t6019-rev-list-ancestry-path.sh

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,33 +75,36 @@ test_expect_success 'rev-list --ancestry-patch D..M -- M.t' '
7575
# a X
7676
# \ / \
7777
# c---cb
78+
#
79+
# All refnames prefixed with 'x' to avoid confusion with the tags
80+
# generated by test_commit on case-insensitive systems.
7881
test_expect_success 'setup criss-cross' '
7982
mkdir criss-cross &&
8083
(cd criss-cross &&
8184
git init &&
8285
test_commit A &&
83-
git checkout -b b master &&
86+
git checkout -b xb master &&
8487
test_commit B &&
85-
git checkout -b c master &&
88+
git checkout -b xc master &&
8689
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 &&
9194
git checkout master)
9295
'
9396

9497
# no commits in bc descend from cb
9598
test_expect_success 'criss-cross: rev-list --ancestry-path cb..bc' '
9699
(cd criss-cross &&
97-
git rev-list --ancestry-path cb..bc > actual &&
100+
git rev-list --ancestry-path xcb..xbc > actual &&
98101
test -z "$(cat actual)")
99102
'
100103

101104
# no commits in repository descend from cb
102105
test_expect_success 'criss-cross: rev-list --ancestry-path --all ^cb' '
103106
(cd criss-cross &&
104-
git rev-list --ancestry-path --all ^cb > actual &&
107+
git rev-list --ancestry-path --all ^xcb > actual &&
105108
test -z "$(cat actual)")
106109
'
107110

0 commit comments

Comments
 (0)