Skip to content

Commit 0f62fba

Browse files
pyokagangitster
authored andcommitted
t3418: non-interactive rebase --continue with rerere enabled
Since 8389b52 (git-rerere: reuse recorded resolve., 2006-01-28), git-am will call git-rerere to re-use recorded merge conflict resolutions if any occur in a threeway merge. Add a test to ensure that git-rerere is called by git-am (which handles the non-interactive rebase). Reviewed-by: Stefan Beller <sbeller@google.com> Reviewed-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Paul Tan <pyokagan@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent bf72ac1 commit 0f62fba

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

t/t3418-rebase-continue.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,25 @@ test_expect_success 'non-interactive rebase --continue works with touched file'
4040
git rebase --continue
4141
'
4242

43+
test_expect_success 'non-interactive rebase --continue with rerere enabled' '
44+
test_config rerere.enabled true &&
45+
test_when_finished "test_might_fail git rebase --abort" &&
46+
git reset --hard commit-new-file-F2-on-topic-branch &&
47+
git checkout master &&
48+
rm -fr .git/rebase-* &&
49+
50+
test_must_fail git rebase --onto master master topic &&
51+
echo "Resolved" >F2 &&
52+
git add F2 &&
53+
cp F2 F2.expected &&
54+
git rebase --continue &&
55+
56+
git reset --hard commit-new-file-F2-on-topic-branch &&
57+
git checkout master &&
58+
test_must_fail git rebase --onto master master topic &&
59+
test_cmp F2.expected F2
60+
'
61+
4362
test_expect_success 'rebase --continue can not be used with other options' '
4463
test_must_fail git rebase -v --continue &&
4564
test_must_fail git rebase --continue -v

0 commit comments

Comments
 (0)