path: root/t/
diff options
authorJunio C Hamano <>2020-03-02 23:07:18 (GMT)
committerJunio C Hamano <>2020-03-02 23:07:19 (GMT)
commit8c22bd9ff9d4a355d3546181698307a797fd2bd2 (patch)
tree2d39f529fee9c5d66847858127bd2f4f1a181f7e /t/
parentcb2f5a8e971bdc4d08dde91c8f16a7464ef94cd8 (diff)
parent10cdb9f38adaa16aad64403bc931405564523985 (diff)
Merge branch 'en/rebase-backend'
"git rebase" has learned to use the merge backend (i.e. the machinery that drives "rebase -i") by default, while allowing "--apply" option to use the "apply" backend (e.g. the moral equivalent of "format-patch piped to am"). The rebase.backend configuration variable can be set to customize. * en/rebase-backend: rebase: rename the two primary rebase backends rebase: change the default backend from "am" to "merge" rebase: make the backend configurable via config setting rebase tests: repeat some tests using the merge backend instead of am rebase tests: mark tests specific to the am-backend with --am rebase: drop '-i' from the reflog for interactive-based rebases git-prompt: change the prompt for interactive-based rebases rebase: add an --am option rebase: move incompatibility checks between backend options a bit earlier git-rebase.txt: add more details about behavioral differences of backends rebase: allow more types of rebases to fast-forward t3432: make these tests work with either am or merge backends rebase: fix handling of restrict_revision rebase: make sure to pass along the quiet flag to the sequencer rebase, sequencer: remove the broken GIT_QUIET handling t3406: simplify an already simple test rebase (interactive-backend): fix handling of commits that become empty rebase (interactive-backend): make --keep-empty the default t3404: directly test the behavior of interest git-rebase.txt: update description of --allow-empty-message
Diffstat (limited to 't/')
1 files changed, 10 insertions, 9 deletions
diff --git a/t/ b/t/
index d79a3ef..c5ce3ab 100755
--- a/t/
+++ b/t/
@@ -72,15 +72,16 @@ test_expect_success 'rebase --keep-empty' '
test_line_count = 6 actual
-test_expect_success 'rebase -i with empty HEAD' '
+test_expect_success 'rebase -i with empty todo list' '
cat >expect <<-\EOF &&
error: nothing to do
set_fake_editor &&
- test_must_fail env FAKE_LINES="1 exec_true" \
- git rebase -i HEAD^ >actual 2>&1
+ test_must_fail env FAKE_LINES="#" \
+ git rebase -i HEAD^ >output 2>&1
) &&
+ tail -n 1 output >actual && # Ignore output about changing todo list
test_i18ncmp expect actual
@@ -222,7 +223,7 @@ test_expect_success 'reflog for the branch shows state before rebase' '
test_expect_success 'reflog for the branch shows correct finish message' '
- printf "rebase -i (finish): refs/heads/branch1 onto %s\n" \
+ printf "rebase (finish): refs/heads/branch1 onto %s\n" \
"$(git rev-parse branch2)" >expected &&
git log -g --pretty=%gs -1 refs/heads/branch1 >actual &&
test_cmp expected actual
@@ -1137,7 +1138,7 @@ test_expect_success C_LOCALE_OUTPUT 'rebase --edit-todo does not work on non-int
git checkout conflict-branch &&
set_fake_editor &&
- test_must_fail git rebase -f --onto HEAD~2 HEAD~ &&
+ test_must_fail git rebase -f --apply --onto HEAD~2 HEAD~ &&
test_must_fail git rebase --edit-todo
) &&
git rebase --abort
@@ -1161,10 +1162,10 @@ test_expect_success 'rebase -i produces readable reflog' '
git branch -f branch-reflog-test H &&
git rebase -i --onto I F branch-reflog-test &&
cat >expect <<-\EOF &&
- rebase -i (finish): returning to refs/heads/branch-reflog-test
- rebase -i (pick): H
- rebase -i (pick): G
- rebase -i (start): checkout I
+ rebase (finish): returning to refs/heads/branch-reflog-test
+ rebase (pick): H
+ rebase (pick): G
+ rebase (start): checkout I
git reflog -n4 HEAD |
sed "s/[^:]*: //" >actual &&