]> granicus.if.org Git - git/commitdiff
t3418: non-interactive rebase --continue with rerere enabled
authorPaul Tan <pyokagan@gmail.com>
Sun, 19 Jul 2015 15:49:17 +0000 (23:49 +0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 20 Jul 2015 17:53:01 +0000 (10:53 -0700)
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>
t/t3418-rebase-continue.sh

index 2680375628207d0d46ee4a9c8335840609461e0a..4428b9086e8bcb383df801834d0de323f316f4fa 100755 (executable)
@@ -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