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>
Paul Tan committed
Jul 19, 2015 at 23:49 UTC
0f62fbae652982d9bb286abed689e9223b0f998e
1 file changed
+19
t/t3418-rebase-continue.sh
+19
@@ -40,6 +40,25 @@ test_expect_success 'non-interactive rebase --continue works with touched file'
40
git rebase --continue
41
'
42
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
+
62
test_expect_success 'rebase --continue can not be used with other options' '
63
test_must_fail git rebase -v --continue &&
64
test_must_fail git rebase --continue -v