Skip to content

Commit

Permalink
t3418: non-interactive rebase --continue with rerere enabled
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paul Tan authored and Junio C Hamano committed Jul 20, 2015
1 parent bf72ac1 commit 0f62fba
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions t/t3418-rebase-continue.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,25 @@ test_expect_success 'non-interactive rebase --continue works with touched file'
git rebase --continue
'

test_expect_success 'non-interactive rebase --continue with rerere enabled' '
test_config rerere.enabled true &&
test_when_finished "test_might_fail git rebase --abort" &&
git reset --hard commit-new-file-F2-on-topic-branch &&
git checkout master &&
rm -fr .git/rebase-* &&
test_must_fail git rebase --onto master master topic &&
echo "Resolved" >F2 &&
git add F2 &&
cp F2 F2.expected &&
git rebase --continue &&
git reset --hard commit-new-file-F2-on-topic-branch &&
git checkout master &&
test_must_fail git rebase --onto master master topic &&
test_cmp F2.expected F2
'

test_expect_success 'rebase --continue can not be used with other options' '
test_must_fail git rebase -v --continue &&
test_must_fail git rebase --continue -v
Expand Down

0 comments on commit 0f62fba

Please sign in to comment.