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 <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Sixt committed
Jun 18, 2013 at 09:28 UTC
984f78d278dd456b12874da1bdf3763e72db8dae
2 files changed
+18
-18
t/t3421-rebase-topology-linear.sh
+10
-10
@@ -79,9 +79,9 @@ test_run_rebase success -p
79
# /
80
# a---b---c---g---h
81
# \
82
-# d---G---i
82
+# d---gp--i
83
#
84
-# uppercase = cherry-picked
84
+# gp = cherry-picked g
85
# h = reverted g
86
#
87
# 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' '
94
test_commit g &&
95
revert h g &&
96
git checkout d &&
97
- cherry_pick G g &&
97
+ cherry_pick gp g &&
98
test_commit i &&
99
git checkout b &&
100
test_commit f
@@ -120,7 +120,7 @@ test_run_rebase () {
120
shift
121
test_expect_$result "rebase $* can drop last patch if in upstream" "
122
reset_rebase &&
123
- git rebase $* h G &&
123
+ git rebase $* h gp &&
124
test_cmp_rev h HEAD^ &&
125
test_linear_range 'd' h..
126
"
@@ -152,7 +152,7 @@ test_run_rebase () {
152
reset_rebase &&
153
git rebase $* --onto h f i &&
154
test_cmp_rev h HEAD~3 &&
155
- test_linear_range 'd G i' h..
155
+ test_linear_range 'd gp i' h..
156
"
157
}
158
test_run_rebase success ''
@@ -222,9 +222,9 @@ test_run_rebase failure -p
222
# /
223
# a---b---c---g
224
#
225
-# x---y---B
225
+# x---y---bp
226
#
227
-# uppercase = cherry-picked
227
+# bp = cherry-picked b
228
# m = reverted b
229
#
230
# 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' '
239
git rm -rf . &&
240
test_commit x &&
241
test_commit y &&
242
- cherry_pick B b
242
+ cherry_pick bp b
243
'
244
245
test_run_rebase () {
@@ -277,7 +277,7 @@ test_run_rebase () {
277
shift
278
test_expect_$result "rebase $* --onto --root drops patch in onto" "
279
reset_rebase &&
280
- git rebase $* --onto m --root B &&
280
+ git rebase $* --onto m --root bp &&
281
test_cmp_rev m HEAD~2 &&
282
test_linear_range 'x y' m..
283
"
@@ -308,7 +308,7 @@ test_run_rebase () {
308
shift
309
test_expect_$result "rebase $* without --onto --root with disjoint history drops patch in onto" "
310
reset_rebase &&
311
- git rebase $* m B &&
311
+ git rebase $* m bp &&
312
test_cmp_rev m HEAD~2 &&
313
test_linear_range 'x y' m..
314
"
t/t3425-rebase-topology-merges.sh
+8
-8
@@ -30,7 +30,7 @@ test_expect_success 'setup of non-linear-history' '
30
test_commit g &&
31
revert h g &&
32
git checkout d &&
33
- cherry_pick G g &&
33
+ cherry_pick gp g &&
34
test_commit i &&
35
git checkout b &&
36
test_commit f
@@ -154,11 +154,11 @@ test_expect_success "rebase -p can re-create two branches on onto" "
154
# /
155
# a---b---c---g---h
156
# \
157
-# d---G---i
157
+# d---gp--i
158
# \ \
159
# e-------u
160
#
161
-# uppercase = cherry-picked
161
+# gp = cherry-picked g
162
# h = reverted g
163
test_expect_success 'setup of non-linear-history for patch-equivalence tests' '
164
git checkout e &&
@@ -186,24 +186,24 @@ test_expect_success "rebase -p --onto in merged history does not drop patches in
186
git rebase -p --onto h f u &&
187
test_cmp_rev h HEAD~3 &&
188
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
190
"
191
192
# a---b---c---g---h
193
# \
194
-# d---G---s
194
+# d---gp--s
195
# \ \ /
196
# \ X
197
# \ / \
198
# e---t
199
#
200
-# uppercase = cherry-picked
200
+# gp = cherry-picked g
201
# h = reverted g
202
test_expect_success 'setup of non-linear-history for dropping whole side' '
203
- git checkout G &&
203
+ git checkout gp &&
204
test_merge s e &&
205
git checkout e &&
206
- test_merge t G
206
+ test_merge t gp
207
'
208
209
test_expect_failure "rebase -p drops merge commit when entire first-parent side is dropped" "