Skip to content

Commit 984f78d

Browse files
j6tgitster
authored andcommitted
rebase topology tests: fix commit names on case-insensitive file systems
The recently introduced tests used uppercase letters to denote cherry-picks of commits having the corresponding lowercase letter names. The helper functions also set up tags with the names of the commits. But this constellation fails on case-insensitive file systems because there cannot be distinct tags with names that differ only in case. Use a less subtle convention for the names of cherry-picked commits. Signed-off-by: Johannes Sixt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent c9581cc commit 984f78d

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

t/t3421-rebase-topology-linear.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ test_run_rebase success -p
7979
# /
8080
# a---b---c---g---h
8181
# \
82-
# d---G---i
82+
# d---gp--i
8383
#
84-
# uppercase = cherry-picked
84+
# gp = cherry-picked g
8585
# h = reverted g
8686
#
8787
# Reverted patches are there for tests to be able to check if a commit
@@ -94,7 +94,7 @@ test_expect_success 'setup of linear history for range selection tests' '
9494
test_commit g &&
9595
revert h g &&
9696
git checkout d &&
97-
cherry_pick G g &&
97+
cherry_pick gp g &&
9898
test_commit i &&
9999
git checkout b &&
100100
test_commit f
@@ -120,7 +120,7 @@ test_run_rebase () {
120120
shift
121121
test_expect_$result "rebase $* can drop last patch if in upstream" "
122122
reset_rebase &&
123-
git rebase $* h G &&
123+
git rebase $* h gp &&
124124
test_cmp_rev h HEAD^ &&
125125
test_linear_range 'd' h..
126126
"
@@ -152,7 +152,7 @@ test_run_rebase () {
152152
reset_rebase &&
153153
git rebase $* --onto h f i &&
154154
test_cmp_rev h HEAD~3 &&
155-
test_linear_range 'd G i' h..
155+
test_linear_range 'd gp i' h..
156156
"
157157
}
158158
test_run_rebase success ''
@@ -222,9 +222,9 @@ test_run_rebase failure -p
222222
# /
223223
# a---b---c---g
224224
#
225-
# x---y---B
225+
# x---y---bp
226226
#
227-
# uppercase = cherry-picked
227+
# bp = cherry-picked b
228228
# m = reverted b
229229
#
230230
# Reverted patches are there for tests to be able to check if a commit
@@ -239,7 +239,7 @@ test_expect_success 'setup of linear history for test involving root' '
239239
git rm -rf . &&
240240
test_commit x &&
241241
test_commit y &&
242-
cherry_pick B b
242+
cherry_pick bp b
243243
'
244244

245245
test_run_rebase () {
@@ -277,7 +277,7 @@ test_run_rebase () {
277277
shift
278278
test_expect_$result "rebase $* --onto --root drops patch in onto" "
279279
reset_rebase &&
280-
git rebase $* --onto m --root B &&
280+
git rebase $* --onto m --root bp &&
281281
test_cmp_rev m HEAD~2 &&
282282
test_linear_range 'x y' m..
283283
"
@@ -308,7 +308,7 @@ test_run_rebase () {
308308
shift
309309
test_expect_$result "rebase $* without --onto --root with disjoint history drops patch in onto" "
310310
reset_rebase &&
311-
git rebase $* m B &&
311+
git rebase $* m bp &&
312312
test_cmp_rev m HEAD~2 &&
313313
test_linear_range 'x y' m..
314314
"

t/t3425-rebase-topology-merges.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ test_expect_success 'setup of non-linear-history' '
3030
test_commit g &&
3131
revert h g &&
3232
git checkout d &&
33-
cherry_pick G g &&
33+
cherry_pick gp g &&
3434
test_commit i &&
3535
git checkout b &&
3636
test_commit f
@@ -154,11 +154,11 @@ test_expect_success "rebase -p can re-create two branches on onto" "
154154
# /
155155
# a---b---c---g---h
156156
# \
157-
# d---G---i
157+
# d---gp--i
158158
# \ \
159159
# e-------u
160160
#
161-
# uppercase = cherry-picked
161+
# gp = cherry-picked g
162162
# h = reverted g
163163
test_expect_success 'setup of non-linear-history for patch-equivalence tests' '
164164
git checkout e &&
@@ -186,24 +186,24 @@ test_expect_success "rebase -p --onto in merged history does not drop patches in
186186
git rebase -p --onto h f u &&
187187
test_cmp_rev h HEAD~3 &&
188188
test_cmp_rev HEAD^2~2 HEAD~2 &&
189-
test_revision_subjects 'd G i e u' HEAD~2 HEAD^2^ HEAD^2 HEAD^ HEAD
189+
test_revision_subjects 'd gp i e u' HEAD~2 HEAD^2^ HEAD^2 HEAD^ HEAD
190190
"
191191

192192
# a---b---c---g---h
193193
# \
194-
# d---G---s
194+
# d---gp--s
195195
# \ \ /
196196
# \ X
197197
# \ / \
198198
# e---t
199199
#
200-
# uppercase = cherry-picked
200+
# gp = cherry-picked g
201201
# h = reverted g
202202
test_expect_success 'setup of non-linear-history for dropping whole side' '
203-
git checkout G &&
203+
git checkout gp &&
204204
test_merge s e &&
205205
git checkout e &&
206-
test_merge t G
206+
test_merge t gp
207207
'
208208

209209
test_expect_failure "rebase -p drops merge commit when entire first-parent side is dropped" "

0 commit comments

Comments
 (0)