rebase tests: mark tests specific to the am-backend with --am
We have many rebase tests in the testsuite, and often the same test is repeated multiple times just testing different backends. For those tests that were specifically trying to test the am backend, add the --am flag. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Elijah Newren committed
Feb 15, 2020 at 21:36 UTC
980b482d28482c307648c3abbcb16ae60843c7ae
11 files changed
+53
-53
t/t3400-rebase.sh
+5
-5
@@ -183,19 +183,19 @@ test_expect_success 'default to common base in @{upstream}s reflog if no upstrea
183
test_cmp expect actual
184
'
185
186
-test_expect_success 'default to common base in @{upstream}s reflog if no upstream arg' '
186
+test_expect_success 'default to common base in @{upstream}s reflog if no upstream arg (--am)' '
187
git checkout -B default-base master &&
188
git checkout -B default topic &&
189
git config branch.default.remote . &&
190
git config branch.default.merge refs/heads/default-base &&
191
- git rebase &&
191
+ git rebase --am &&
192
git rev-parse --verify default-base >expect &&
193
git rev-parse default~1 >actual &&
194
test_cmp expect actual &&
195
git checkout default-base &&
196
git reset --hard HEAD^ &&
197
git checkout default &&
198
- git rebase &&
198
+ git rebase --am &&
199
git rev-parse --verify default-base >expect &&
200
git rev-parse default~1 >actual &&
201
test_cmp expect actual
@@ -226,7 +226,7 @@ test_expect_success 'cherry-picked commits and fork-point work together' '
226
227
test_expect_success 'rebase --am -q is quiet' '
228
git checkout -b quiet topic &&
229
- git rebase -q master >output.out 2>&1 &&
229
+ git rebase --am -q master >output.out 2>&1 &&
230
test_must_be_empty output.out
231
'
232
@@ -325,7 +325,7 @@ test_expect_success 'rebase --am and --show-current-patch' '
325
echo two >>init.t &&
326
git commit -a -m two &&
327
git tag two &&
328
- test_must_fail git rebase -f --onto init HEAD^ &&
328
+ test_must_fail git rebase --am -f --onto init HEAD^ &&
329
GIT_TRACE=1 git rebase --show-current-patch >/dev/null 2>stderr &&
330
grep "show.*$(git rev-parse two)" stderr
331
)
t/t3401-rebase-and-am-rename.sh
+2
-2
@@ -52,13 +52,13 @@ test_expect_success 'rebase --interactive: directory rename detected' '
52
)
53
'
54
55
-test_expect_failure 'rebase (am): directory rename detected' '
55
+test_expect_failure 'rebase --am: directory rename detected' '
56
(
57
cd dir-rename &&
58
59
git checkout B^0 &&
60
61
- git -c merge.directoryRenames=true rebase A &&
61
+ git -c merge.directoryRenames=true rebase --am A &&
62
63
git ls-files -s >out &&
64
test_line_count = 5 out &&
t/t3404-rebase-interactive.sh
+1
-1
@@ -1138,7 +1138,7 @@ test_expect_success C_LOCALE_OUTPUT 'rebase --edit-todo does not work on non-int
1138
git checkout conflict-branch &&
1139
(
1140
set_fake_editor &&
1141
- test_must_fail git rebase -f --onto HEAD~2 HEAD~ &&
1141
+ test_must_fail git rebase -f --am --onto HEAD~2 HEAD~ &&
1142
test_must_fail git rebase --edit-todo
1143
) &&
1144
git rebase --abort
t/t3406-rebase-message.sh
+6
-6
@@ -23,24 +23,24 @@ test_expect_success 'rebase -m' '
23
'
24
25
test_expect_success 'rebase against master twice' '
26
- git rebase master >out &&
26
+ git rebase --am master >out &&
27
test_i18ngrep "Current branch topic is up to date" out
28
'
29
30
test_expect_success 'rebase against master twice with --force' '
31
- git rebase --force-rebase master >out &&
31
+ git rebase --force-rebase --am master >out &&
32
test_i18ngrep "Current branch topic is up to date, rebase forced" out
33
'
34
35
test_expect_success 'rebase against master twice from another branch' '
36
git checkout topic^ &&
37
- git rebase master topic >out &&
37
+ git rebase --am master topic >out &&
38
test_i18ngrep "Current branch topic is up to date" out
39
'
40
41
test_expect_success 'rebase fast-forward to master' '
42
git checkout topic^ &&
43
- git rebase topic >out &&
43
+ git rebase --am topic >out &&
44
test_i18ngrep "Fast-forwarded HEAD to topic" out
45
'
46
@@ -89,7 +89,7 @@ test_expect_success 'GIT_REFLOG_ACTION' '
89
git checkout -b reflog-topic start &&
90
test_commit reflog-to-rebase &&
91
92
- git rebase reflog-onto &&
92
+ git rebase --am reflog-onto &&
93
git log -g --format=%gs -3 >actual &&
94
cat >expect <<-\EOF &&
95
rebase finished: returning to refs/heads/reflog-topic
@@ -99,7 +99,7 @@ test_expect_success 'GIT_REFLOG_ACTION' '
99
test_cmp expect actual &&
100
101
git checkout -b reflog-prefix reflog-to-rebase &&
102
- GIT_REFLOG_ACTION=change-the-reflog git rebase reflog-onto &&
102
+ GIT_REFLOG_ACTION=change-the-reflog git rebase --am reflog-onto &&
103
git log -g --format=%gs -3 >actual &&
104
cat >expect <<-\EOF &&
105
rebase finished: returning to refs/heads/reflog-prefix
t/t3407-rebase-abort.sh
+3
-3
@@ -96,14 +96,14 @@ testrebase() {
96
'
97
}
98
99
-testrebase "" .git/rebase-apply
99
+testrebase " --am" .git/rebase-apply
100
testrebase " --merge" .git/rebase-merge
101
102
-test_expect_success 'rebase --quit' '
102
+test_expect_success 'rebase --am --quit' '
103
cd "$work_dir" &&
104
# Clean up the state from the previous one
105
git reset --hard pre-rebase &&
106
- test_must_fail git rebase master &&
106
+ test_must_fail git rebase --am master &&
107
test_path_is_dir .git/rebase-apply &&
108
head_before=$(git rev-parse HEAD) &&
109
git rebase --quit &&
t/t3420-rebase-autostash.sh
+1
-1
@@ -234,7 +234,7 @@ test_expect_success "rebase: noop rebase" '
234
git checkout feature-branch
235
'
236
237
-testrebase "" .git/rebase-apply
237
+testrebase " --am" .git/rebase-apply
238
testrebase " --merge" .git/rebase-merge
239
testrebase " --interactive" .git/rebase-merge
240
t/t3421-rebase-topology-linear.sh
+17
-17
@@ -26,7 +26,7 @@ test_run_rebase () {
26
test_linear_range 'd e' c..
27
"
28
}
29
-test_run_rebase success ''
29
+test_run_rebase success --am
30
test_run_rebase success -m
31
test_run_rebase success -i
32
test_have_prereq !REBASE_P || test_run_rebase success -p
@@ -50,7 +50,7 @@ test_run_rebase () {
50
test_cmp_rev e HEAD
51
"
52
}
53
-test_run_rebase success ''
53
+test_run_rebase success --am
54
test_run_rebase success -m
55
test_run_rebase success -i
56
test_have_prereq !REBASE_P || test_run_rebase success -p
@@ -66,7 +66,7 @@ test_run_rebase () {
66
test_linear_range 'd e' b..
67
"
68
}
69
-test_run_rebase success ''
69
+test_run_rebase success --am
70
test_run_rebase success --fork-point
71
test_run_rebase success -m
72
test_run_rebase success -i
@@ -83,7 +83,7 @@ test_run_rebase () {
83
test_linear_range 'd e' branch-b..
84
"
85
}
86
-test_run_rebase success ''
86
+test_run_rebase success --am
87
test_run_rebase success --fork-point
88
test_run_rebase success -m
89
test_run_rebase success -i
@@ -98,7 +98,7 @@ test_run_rebase () {
98
test_cmp_rev e HEAD
99
"
100
}
101
-test_run_rebase success ''
101
+test_run_rebase success --am
102
test_run_rebase success --fork-point
103
test_run_rebase success -m
104
test_run_rebase success -i
@@ -139,7 +139,7 @@ test_run_rebase () {
139
test_linear_range 'd i' h..
140
"
141
}
142
-test_run_rebase success ''
142
+test_run_rebase success --am
143
test_run_rebase success -m
144
test_run_rebase success -i
145
test_have_prereq !REBASE_P || test_run_rebase success -p
@@ -154,7 +154,7 @@ test_run_rebase () {
154
test_linear_range 'd' h..
155
"
156
}
157
-test_run_rebase success ''
157
+test_run_rebase success --am
158
test_run_rebase success -m
159
test_run_rebase success -i
160
test_have_prereq !REBASE_P || test_run_rebase success -p
@@ -169,7 +169,7 @@ test_run_rebase () {
169
test_linear_range 'd i' f..
170
"
171
}
172
-test_run_rebase success ''
172
+test_run_rebase success --am
173
test_run_rebase success -m
174
test_run_rebase success -i
175
test_have_prereq !REBASE_P || test_run_rebase success -p
@@ -184,7 +184,7 @@ test_run_rebase () {
184
test_linear_range 'd gp i' h..
185
"
186
}
187
-test_run_rebase success ''
187
+test_run_rebase success --am
188
test_run_rebase success -m
189
test_run_rebase success -i
190
test_have_prereq !REBASE_P || test_run_rebase success -p
@@ -212,7 +212,7 @@ test_run_rebase () {
212
test_linear_range 'j d k l' c..
213
"
214
}
215
-test_run_rebase failure ''
215
+test_run_rebase failure --am
216
test_run_rebase success -m
217
test_run_rebase success -i
218
test_have_prereq !REBASE_P || test_run_rebase failure -p
@@ -227,7 +227,7 @@ test_run_rebase () {
227
test_linear_range 'd k l' c..
228
"
229
}
230
-test_run_rebase success ''
230
+test_run_rebase success --am
231
test_run_rebase success -m
232
test_run_rebase success -i
233
test_have_prereq !REBASE_P || test_run_rebase success -p
@@ -242,7 +242,7 @@ test_run_rebase () {
242
test_linear_range 'd k l' j..
243
"
244
}
245
-test_run_rebase success ''
245
+test_run_rebase success --am
246
test_run_rebase success -m
247
test_run_rebase success -i
248
test_have_prereq !REBASE_P || test_run_rebase success -p
@@ -282,7 +282,7 @@ test_run_rebase () {
282
test_linear_range 'x y' c..
283
"
284
}
285
-test_run_rebase success ''
285
+test_run_rebase success --am
286
test_run_rebase success -m
287
test_run_rebase success -i
288
test_have_prereq !REBASE_P || test_run_rebase success -p
@@ -297,7 +297,7 @@ test_run_rebase () {
297
test_linear_range 'x y' c..
298
"
299
}
300
-test_run_rebase success ''
300
+test_run_rebase success --am
301
test_run_rebase success -m
302
test_run_rebase success -i
303
test_have_prereq !REBASE_P || test_run_rebase failure -p
@@ -312,7 +312,7 @@ test_run_rebase () {
312
test_linear_range 'x y' m..
313
"
314
}
315
-test_run_rebase success ''
315
+test_run_rebase success --am
316
test_run_rebase success -m
317
test_run_rebase success -i
318
test_have_prereq !REBASE_P || test_run_rebase success -p
@@ -328,7 +328,7 @@ test_run_rebase () {
328
"
329
}
330
331
-test_run_rebase success ''
331
+test_run_rebase success --am
332
test_run_rebase success -m
333
test_run_rebase success -i
334
test_have_prereq !REBASE_P || test_run_rebase failure -p
@@ -343,7 +343,7 @@ test_run_rebase () {
343
test_linear_range 'x y' m..
344
"
345
}
346
-test_run_rebase success ''
346
+test_run_rebase success --am
347
test_run_rebase success -m
348
test_run_rebase success -i
349
test_have_prereq !REBASE_P || test_run_rebase failure -p
t/t3425-rebase-topology-merges.sh
+4
-4
@@ -54,7 +54,7 @@ test_run_rebase () {
54
test_linear_range 'n o' e..
55
"
56
}
57
-test_run_rebase success ''
57
+test_run_rebase success --am
58
test_run_rebase success -m
59
test_run_rebase success -i
60
@@ -70,7 +70,7 @@ test_run_rebase () {
70
test_linear_range "\'"$expected"\'" d..
71
"
72
}
73
-test_run_rebase success 'n o e' ''
73
+test_run_rebase success 'n o e' --am
74
test_run_rebase success 'n o e' -m
75
test_run_rebase success 'n o e' -i
76
@@ -86,7 +86,7 @@ test_run_rebase () {
86
test_linear_range "\'"$expected"\'" c..
87
"
88
}
89
-test_run_rebase success 'd n o e' ''
89
+test_run_rebase success 'd n o e' --am
90
test_run_rebase success 'd n o e' -m
91
test_run_rebase success 'd n o e' -i
92
@@ -102,7 +102,7 @@ test_run_rebase () {
102
test_linear_range "\'"$expected"\'" c..
103
"
104
}
105
-test_run_rebase success 'd n o e' ''
105
+test_run_rebase success 'd n o e' --am
106
test_run_rebase success 'd n o e' -m
107
test_run_rebase success 'd n o e' -i
108
t/t3432-rebase-fast-forward.sh
+2
-2
@@ -28,8 +28,8 @@ test_rebase_same_head () {
28
shift &&
29
cmp_f="$1" &&
30
shift &&
31
- test_rebase_same_head_ $status_n $what_n $cmp_n "" "$*" &&
32
- test_rebase_same_head_ $status_f $what_f $cmp_f " --no-ff" "$*"
31
+ test_rebase_same_head_ $status_n $what_n $cmp_n " --am" "$*" &&
32
+ test_rebase_same_head_ $status_f $what_f $cmp_f " --am --no-ff" "$*"
33
test_rebase_same_head_ $status_n $what_n $cmp_n " --merge" "$*" &&
34
test_rebase_same_head_ $status_f $what_f $cmp_f " --merge --no-ff" "$*"
35
}
t/t5407-post-rewrite-hook.sh
+6
-6
@@ -53,10 +53,10 @@ test_expect_success 'git commit --amend --no-post-rewrite' '
53
test ! -f post-rewrite.data
54
'
55
56
-test_expect_success 'git rebase' '
56
+test_expect_success 'git rebase --am' '
57
git reset --hard D &&
58
clear_hook_input &&
59
- test_must_fail git rebase --onto A B &&
59
+ test_must_fail git rebase --am --onto A B &&
60
echo C > foo &&
61
git add foo &&
62
git rebase --continue &&
@@ -68,10 +68,10 @@ test_expect_success 'git rebase' '
68
verify_hook_input
69
'
70
71
-test_expect_success 'git rebase --skip' '
71
+test_expect_success 'git rebase --am --skip' '
72
git reset --hard D &&
73
clear_hook_input &&
74
- test_must_fail git rebase --onto A B &&
74
+ test_must_fail git rebase --am --onto A B &&
75
test_must_fail git rebase --skip &&
76
echo D > foo &&
77
git add foo &&
@@ -84,10 +84,10 @@ test_expect_success 'git rebase --skip' '
84
verify_hook_input
85
'
86
87
-test_expect_success 'git rebase --skip the last one' '
87
+test_expect_success 'git rebase --am --skip the last one' '
88
git reset --hard F &&
89
clear_hook_input &&
90
- test_must_fail git rebase --onto D A &&
90
+ test_must_fail git rebase --am --onto D A &&
91
git rebase --skip &&
92
echo rebase >expected.args &&
93
cat >expected.data <<-EOF &&
t/t7512-status-help.sh
+6
-6
@@ -71,10 +71,10 @@ test_expect_success 'prepare for rebase conflicts' '
71
'
72
73
74
-test_expect_success 'status when rebase in progress before resolving conflicts' '
74
+test_expect_success 'status when rebase --am in progress before resolving conflicts' '
75
test_when_finished "git rebase --abort" &&
76
ONTO=$(git rev-parse --short HEAD^^) &&
77
- test_must_fail git rebase HEAD^ --onto HEAD^^ &&
77
+ test_must_fail git rebase --am HEAD^ --onto HEAD^^ &&
78
cat >expected <<EOF &&
79
rebase in progress; onto $ONTO
80
You are currently rebasing branch '\''rebase_conflicts'\'' on '\''$ONTO'\''.
@@ -94,11 +94,11 @@ EOF
94
'
95
96
97
-test_expect_success 'status when rebase in progress before rebase --continue' '
97
+test_expect_success 'status when rebase --am in progress before rebase --continue' '
98
git reset --hard rebase_conflicts &&
99
test_when_finished "git rebase --abort" &&
100
ONTO=$(git rev-parse --short HEAD^^) &&
101
- test_must_fail git rebase HEAD^ --onto HEAD^^ &&
101
+ test_must_fail git rebase --am HEAD^ --onto HEAD^^ &&
102
echo three >main.txt &&
103
git add main.txt &&
104
cat >expected <<EOF &&
@@ -688,7 +688,7 @@ EOF
688
'
689
690
691
-test_expect_success 'status when rebase conflicts with statushints disabled' '
691
+test_expect_success 'status when rebase --am conflicts with statushints disabled' '
692
git reset --hard master &&
693
git checkout -b statushints_disabled &&
694
test_when_finished "git config --local advice.statushints true" &&
@@ -698,7 +698,7 @@ test_expect_success 'status when rebase conflicts with statushints disabled' '
698
test_commit three_statushints main.txt three &&
699
test_when_finished "git rebase --abort" &&
700
ONTO=$(git rev-parse --short HEAD^^) &&
701
- test_must_fail git rebase HEAD^ --onto HEAD^^ &&
701
+ test_must_fail git rebase --am HEAD^ --onto HEAD^^ &&
702
cat >expected <<EOF &&
703
rebase in progress; onto $ONTO
704
You are currently rebasing branch '\''statushints_disabled'\'' on '\''$ONTO'\''.