Skip to content

Commit a63f990

Browse files
dschogitster
authored andcommitted
t3418: test rebase -r with merge strategies
There is a test case in this script that verifies that `git rebase --preserve-merges` works all right with non-default merge strategies or non-default merge strategy options. Now that `git rebase --rebase-merges` learned about merge strategies, let's copy-edit this test case to verify that that works as intended, too. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 5dcdd74 commit a63f990

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

t/t3418-rebase-continue.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,20 @@ test_expect_success REBASE_P 'rebase passes merge strategy options correctly' '
120120
git rebase --continue
121121
'
122122

123+
test_expect_success 'rebase -r passes merge strategy options correctly' '
124+
rm -fr .git/rebase-* &&
125+
git reset --hard commit-new-file-F3-on-topic-branch &&
126+
test_commit merge-theirs &&
127+
git reset --hard HEAD^ &&
128+
test_commit some-other-commit &&
129+
test_tick &&
130+
git merge --no-ff merge-theirs &&
131+
FAKE_LINES="1 3 edit 4 5 7 8 9" git rebase -i -f -r -m \
132+
-s recursive --strategy-option=theirs HEAD~2 &&
133+
test_commit force-change-ours &&
134+
git rebase --continue
135+
'
136+
123137
test_expect_success '--skip after failed fixup cleans commit message' '
124138
test_when_finished "test_might_fail git rebase --abort" &&
125139
git checkout -b with-conflicting-fixup &&

0 commit comments

Comments
 (0)