Skip to content

Commit 980b482

Browse files
newrengitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent c2417d3 commit 980b482

11 files changed

+53
-53
lines changed

t/t3400-rebase.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -183,19 +183,19 @@ test_expect_success 'default to common base in @{upstream}s reflog if no upstrea
183183
test_cmp expect actual
184184
'
185185

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)' '
187187
git checkout -B default-base master &&
188188
git checkout -B default topic &&
189189
git config branch.default.remote . &&
190190
git config branch.default.merge refs/heads/default-base &&
191-
git rebase &&
191+
git rebase --am &&
192192
git rev-parse --verify default-base >expect &&
193193
git rev-parse default~1 >actual &&
194194
test_cmp expect actual &&
195195
git checkout default-base &&
196196
git reset --hard HEAD^ &&
197197
git checkout default &&
198-
git rebase &&
198+
git rebase --am &&
199199
git rev-parse --verify default-base >expect &&
200200
git rev-parse default~1 >actual &&
201201
test_cmp expect actual
@@ -226,7 +226,7 @@ test_expect_success 'cherry-picked commits and fork-point work together' '
226226

227227
test_expect_success 'rebase --am -q is quiet' '
228228
git checkout -b quiet topic &&
229-
git rebase -q master >output.out 2>&1 &&
229+
git rebase --am -q master >output.out 2>&1 &&
230230
test_must_be_empty output.out
231231
'
232232

@@ -325,7 +325,7 @@ test_expect_success 'rebase --am and --show-current-patch' '
325325
echo two >>init.t &&
326326
git commit -a -m two &&
327327
git tag two &&
328-
test_must_fail git rebase -f --onto init HEAD^ &&
328+
test_must_fail git rebase --am -f --onto init HEAD^ &&
329329
GIT_TRACE=1 git rebase --show-current-patch >/dev/null 2>stderr &&
330330
grep "show.*$(git rev-parse two)" stderr
331331
)

t/t3401-rebase-and-am-rename.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ test_expect_success 'rebase --interactive: directory rename detected' '
5252
)
5353
'
5454

55-
test_expect_failure 'rebase (am): directory rename detected' '
55+
test_expect_failure 'rebase --am: directory rename detected' '
5656
(
5757
cd dir-rename &&
5858
5959
git checkout B^0 &&
6060
61-
git -c merge.directoryRenames=true rebase A &&
61+
git -c merge.directoryRenames=true rebase --am A &&
6262
6363
git ls-files -s >out &&
6464
test_line_count = 5 out &&

t/t3404-rebase-interactive.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1138,7 +1138,7 @@ test_expect_success C_LOCALE_OUTPUT 'rebase --edit-todo does not work on non-int
11381138
git checkout conflict-branch &&
11391139
(
11401140
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~ &&
11421142
test_must_fail git rebase --edit-todo
11431143
) &&
11441144
git rebase --abort

t/t3406-rebase-message.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,24 +23,24 @@ test_expect_success 'rebase -m' '
2323
'
2424

2525
test_expect_success 'rebase against master twice' '
26-
git rebase master >out &&
26+
git rebase --am master >out &&
2727
test_i18ngrep "Current branch topic is up to date" out
2828
'
2929

3030
test_expect_success 'rebase against master twice with --force' '
31-
git rebase --force-rebase master >out &&
31+
git rebase --force-rebase --am master >out &&
3232
test_i18ngrep "Current branch topic is up to date, rebase forced" out
3333
'
3434

3535
test_expect_success 'rebase against master twice from another branch' '
3636
git checkout topic^ &&
37-
git rebase master topic >out &&
37+
git rebase --am master topic >out &&
3838
test_i18ngrep "Current branch topic is up to date" out
3939
'
4040

4141
test_expect_success 'rebase fast-forward to master' '
4242
git checkout topic^ &&
43-
git rebase topic >out &&
43+
git rebase --am topic >out &&
4444
test_i18ngrep "Fast-forwarded HEAD to topic" out
4545
'
4646

@@ -89,7 +89,7 @@ test_expect_success 'GIT_REFLOG_ACTION' '
8989
git checkout -b reflog-topic start &&
9090
test_commit reflog-to-rebase &&
9191
92-
git rebase reflog-onto &&
92+
git rebase --am reflog-onto &&
9393
git log -g --format=%gs -3 >actual &&
9494
cat >expect <<-\EOF &&
9595
rebase finished: returning to refs/heads/reflog-topic
@@ -99,7 +99,7 @@ test_expect_success 'GIT_REFLOG_ACTION' '
9999
test_cmp expect actual &&
100100
101101
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 &&
103103
git log -g --format=%gs -3 >actual &&
104104
cat >expect <<-\EOF &&
105105
rebase finished: returning to refs/heads/reflog-prefix

t/t3407-rebase-abort.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,14 @@ testrebase() {
9696
'
9797
}
9898

99-
testrebase "" .git/rebase-apply
99+
testrebase " --am" .git/rebase-apply
100100
testrebase " --merge" .git/rebase-merge
101101

102-
test_expect_success 'rebase --quit' '
102+
test_expect_success 'rebase --am --quit' '
103103
cd "$work_dir" &&
104104
# Clean up the state from the previous one
105105
git reset --hard pre-rebase &&
106-
test_must_fail git rebase master &&
106+
test_must_fail git rebase --am master &&
107107
test_path_is_dir .git/rebase-apply &&
108108
head_before=$(git rev-parse HEAD) &&
109109
git rebase --quit &&

t/t3420-rebase-autostash.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ test_expect_success "rebase: noop rebase" '
234234
git checkout feature-branch
235235
'
236236

237-
testrebase "" .git/rebase-apply
237+
testrebase " --am" .git/rebase-apply
238238
testrebase " --merge" .git/rebase-merge
239239
testrebase " --interactive" .git/rebase-merge
240240

t/t3421-rebase-topology-linear.sh

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ test_run_rebase () {
2626
test_linear_range 'd e' c..
2727
"
2828
}
29-
test_run_rebase success ''
29+
test_run_rebase success --am
3030
test_run_rebase success -m
3131
test_run_rebase success -i
3232
test_have_prereq !REBASE_P || test_run_rebase success -p
@@ -50,7 +50,7 @@ test_run_rebase () {
5050
test_cmp_rev e HEAD
5151
"
5252
}
53-
test_run_rebase success ''
53+
test_run_rebase success --am
5454
test_run_rebase success -m
5555
test_run_rebase success -i
5656
test_have_prereq !REBASE_P || test_run_rebase success -p
@@ -66,7 +66,7 @@ test_run_rebase () {
6666
test_linear_range 'd e' b..
6767
"
6868
}
69-
test_run_rebase success ''
69+
test_run_rebase success --am
7070
test_run_rebase success --fork-point
7171
test_run_rebase success -m
7272
test_run_rebase success -i
@@ -83,7 +83,7 @@ test_run_rebase () {
8383
test_linear_range 'd e' branch-b..
8484
"
8585
}
86-
test_run_rebase success ''
86+
test_run_rebase success --am
8787
test_run_rebase success --fork-point
8888
test_run_rebase success -m
8989
test_run_rebase success -i
@@ -98,7 +98,7 @@ test_run_rebase () {
9898
test_cmp_rev e HEAD
9999
"
100100
}
101-
test_run_rebase success ''
101+
test_run_rebase success --am
102102
test_run_rebase success --fork-point
103103
test_run_rebase success -m
104104
test_run_rebase success -i
@@ -139,7 +139,7 @@ test_run_rebase () {
139139
test_linear_range 'd i' h..
140140
"
141141
}
142-
test_run_rebase success ''
142+
test_run_rebase success --am
143143
test_run_rebase success -m
144144
test_run_rebase success -i
145145
test_have_prereq !REBASE_P || test_run_rebase success -p
@@ -154,7 +154,7 @@ test_run_rebase () {
154154
test_linear_range 'd' h..
155155
"
156156
}
157-
test_run_rebase success ''
157+
test_run_rebase success --am
158158
test_run_rebase success -m
159159
test_run_rebase success -i
160160
test_have_prereq !REBASE_P || test_run_rebase success -p
@@ -169,7 +169,7 @@ test_run_rebase () {
169169
test_linear_range 'd i' f..
170170
"
171171
}
172-
test_run_rebase success ''
172+
test_run_rebase success --am
173173
test_run_rebase success -m
174174
test_run_rebase success -i
175175
test_have_prereq !REBASE_P || test_run_rebase success -p
@@ -184,7 +184,7 @@ test_run_rebase () {
184184
test_linear_range 'd gp i' h..
185185
"
186186
}
187-
test_run_rebase success ''
187+
test_run_rebase success --am
188188
test_run_rebase success -m
189189
test_run_rebase success -i
190190
test_have_prereq !REBASE_P || test_run_rebase success -p
@@ -212,7 +212,7 @@ test_run_rebase () {
212212
test_linear_range 'j d k l' c..
213213
"
214214
}
215-
test_run_rebase failure ''
215+
test_run_rebase failure --am
216216
test_run_rebase success -m
217217
test_run_rebase success -i
218218
test_have_prereq !REBASE_P || test_run_rebase failure -p
@@ -227,7 +227,7 @@ test_run_rebase () {
227227
test_linear_range 'd k l' c..
228228
"
229229
}
230-
test_run_rebase success ''
230+
test_run_rebase success --am
231231
test_run_rebase success -m
232232
test_run_rebase success -i
233233
test_have_prereq !REBASE_P || test_run_rebase success -p
@@ -242,7 +242,7 @@ test_run_rebase () {
242242
test_linear_range 'd k l' j..
243243
"
244244
}
245-
test_run_rebase success ''
245+
test_run_rebase success --am
246246
test_run_rebase success -m
247247
test_run_rebase success -i
248248
test_have_prereq !REBASE_P || test_run_rebase success -p
@@ -282,7 +282,7 @@ test_run_rebase () {
282282
test_linear_range 'x y' c..
283283
"
284284
}
285-
test_run_rebase success ''
285+
test_run_rebase success --am
286286
test_run_rebase success -m
287287
test_run_rebase success -i
288288
test_have_prereq !REBASE_P || test_run_rebase success -p
@@ -297,7 +297,7 @@ test_run_rebase () {
297297
test_linear_range 'x y' c..
298298
"
299299
}
300-
test_run_rebase success ''
300+
test_run_rebase success --am
301301
test_run_rebase success -m
302302
test_run_rebase success -i
303303
test_have_prereq !REBASE_P || test_run_rebase failure -p
@@ -312,7 +312,7 @@ test_run_rebase () {
312312
test_linear_range 'x y' m..
313313
"
314314
}
315-
test_run_rebase success ''
315+
test_run_rebase success --am
316316
test_run_rebase success -m
317317
test_run_rebase success -i
318318
test_have_prereq !REBASE_P || test_run_rebase success -p
@@ -328,7 +328,7 @@ test_run_rebase () {
328328
"
329329
}
330330

331-
test_run_rebase success ''
331+
test_run_rebase success --am
332332
test_run_rebase success -m
333333
test_run_rebase success -i
334334
test_have_prereq !REBASE_P || test_run_rebase failure -p
@@ -343,7 +343,7 @@ test_run_rebase () {
343343
test_linear_range 'x y' m..
344344
"
345345
}
346-
test_run_rebase success ''
346+
test_run_rebase success --am
347347
test_run_rebase success -m
348348
test_run_rebase success -i
349349
test_have_prereq !REBASE_P || test_run_rebase failure -p

t/t3425-rebase-topology-merges.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ test_run_rebase () {
5454
test_linear_range 'n o' e..
5555
"
5656
}
57-
test_run_rebase success ''
57+
test_run_rebase success --am
5858
test_run_rebase success -m
5959
test_run_rebase success -i
6060

@@ -70,7 +70,7 @@ test_run_rebase () {
7070
test_linear_range "\'"$expected"\'" d..
7171
"
7272
}
73-
test_run_rebase success 'n o e' ''
73+
test_run_rebase success 'n o e' --am
7474
test_run_rebase success 'n o e' -m
7575
test_run_rebase success 'n o e' -i
7676

@@ -86,7 +86,7 @@ test_run_rebase () {
8686
test_linear_range "\'"$expected"\'" c..
8787
"
8888
}
89-
test_run_rebase success 'd n o e' ''
89+
test_run_rebase success 'd n o e' --am
9090
test_run_rebase success 'd n o e' -m
9191
test_run_rebase success 'd n o e' -i
9292

@@ -102,7 +102,7 @@ test_run_rebase () {
102102
test_linear_range "\'"$expected"\'" c..
103103
"
104104
}
105-
test_run_rebase success 'd n o e' ''
105+
test_run_rebase success 'd n o e' --am
106106
test_run_rebase success 'd n o e' -m
107107
test_run_rebase success 'd n o e' -i
108108

t/t3432-rebase-fast-forward.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ test_rebase_same_head () {
2828
shift &&
2929
cmp_f="$1" &&
3030
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" "$*"
3333
test_rebase_same_head_ $status_n $what_n $cmp_n " --merge" "$*" &&
3434
test_rebase_same_head_ $status_f $what_f $cmp_f " --merge --no-ff" "$*"
3535
}

t/t5407-post-rewrite-hook.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ test_expect_success 'git commit --amend --no-post-rewrite' '
5353
test ! -f post-rewrite.data
5454
'
5555

56-
test_expect_success 'git rebase' '
56+
test_expect_success 'git rebase --am' '
5757
git reset --hard D &&
5858
clear_hook_input &&
59-
test_must_fail git rebase --onto A B &&
59+
test_must_fail git rebase --am --onto A B &&
6060
echo C > foo &&
6161
git add foo &&
6262
git rebase --continue &&
@@ -68,10 +68,10 @@ test_expect_success 'git rebase' '
6868
verify_hook_input
6969
'
7070

71-
test_expect_success 'git rebase --skip' '
71+
test_expect_success 'git rebase --am --skip' '
7272
git reset --hard D &&
7373
clear_hook_input &&
74-
test_must_fail git rebase --onto A B &&
74+
test_must_fail git rebase --am --onto A B &&
7575
test_must_fail git rebase --skip &&
7676
echo D > foo &&
7777
git add foo &&
@@ -84,10 +84,10 @@ test_expect_success 'git rebase --skip' '
8484
verify_hook_input
8585
'
8686

87-
test_expect_success 'git rebase --skip the last one' '
87+
test_expect_success 'git rebase --am --skip the last one' '
8888
git reset --hard F &&
8989
clear_hook_input &&
90-
test_must_fail git rebase --onto D A &&
90+
test_must_fail git rebase --am --onto D A &&
9191
git rebase --skip &&
9292
echo rebase >expected.args &&
9393
cat >expected.data <<-EOF &&

0 commit comments

Comments
 (0)