]> git.ipfire.org Git - thirdparty/git.git/commitdiff
rebase --apply: restore some tests
authorPhillip Wood <phillip.wood@dunelm.org.uk>
Thu, 12 Aug 2021 13:42:08 +0000 (13:42 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 13 Aug 2021 18:36:22 +0000 (11:36 -0700)
980b482d28 ("rebase tests: mark tests specific to the am-backend with
--am", 2020-02-15) sought to prepare tests testing the "apply" backend
in preparation for 2ac0d6273f ("rebase: change the default backend
from "am" to "merge"", 2020-02-15). However some tests seem to have
been missed leading to us testing the "merge" backend twice. This
patch fixes some cases that I noticed while adding tests to these
files, I have not audited all the other rebase test files. I've
reworded a couple of the test descriptions to make it clear which
backend they are testing.

Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Reviewed-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t3403-rebase-skip.sh
t/t3418-rebase-continue.sh

index 6365c5af2f726ef7ae3ebe73849e12dc88f4fe2a..a44e68d0ffbe2bf20f4c994c9f659d7246110a83 100755 (executable)
@@ -52,7 +52,7 @@ test_expect_success setup '
        '
 
 test_expect_success 'rebase with git am -3 (default)' '
-       test_must_fail git rebase main
+       test_must_fail git rebase --apply main
 '
 
 test_expect_success 'rebase --skip can not be used with other options' '
index f4c2ee02bc98c13eb72fd5f2ecf07134f5fd3845..bda5e5db802f3b547c41799f49d1f99157c2bb8e 100755 (executable)
@@ -21,7 +21,7 @@ test_expect_success 'setup' '
        git checkout main
 '
 
-test_expect_success 'interactive rebase --continue works with touched file' '
+test_expect_success 'merge based rebase --continue with works with touched file' '
        rm -fr .git/rebase-* &&
        git reset --hard &&
        git checkout main &&
@@ -31,12 +31,12 @@ test_expect_success 'interactive rebase --continue works with touched file' '
        git rebase --continue
 '
 
-test_expect_success 'non-interactive rebase --continue works with touched file' '
+test_expect_success 'apply based rebase --continue works with touched file' '
        rm -fr .git/rebase-* &&
        git reset --hard &&
        git checkout main &&
 
-       test_must_fail git rebase --onto main main topic &&
+       test_must_fail git rebase --apply --onto main main topic &&
        echo "Resolved" >F2 &&
        git add F2 &&
        test-tool chmtime =-60 F1 &&
@@ -254,7 +254,7 @@ test_rerere_autoupdate () {
        '
 }
 
-test_rerere_autoupdate
+test_rerere_autoupdate --apply
 test_rerere_autoupdate -m
 GIT_SEQUENCE_EDITOR=: && export GIT_SEQUENCE_EDITOR
 test_rerere_autoupdate -i