aboutsummaryrefslogtreecommitdiff
path: root/t/t3404-rebase-interactive.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-09-29 22:28:12 -0700
committerJunio C Hamano <gitster@pobox.com>2012-09-29 22:28:12 -0700
commit68a31b7d956e958f1b51e80f6cb91858e416c95d (patch)
tree8b260e1da7ef80c08a1535c2f719d15bfc7f9178 /t/t3404-rebase-interactive.sh
parentf5fd2a7d179a8bb843ec44d2a594e6ccf50dfb3a (diff)
parent9c8e1011b9f6979777946ff87aae7b5846ed20a7 (diff)
downloadgit-68a31b7d956e958f1b51e80f6cb91858e416c95d.tar.gz
git-68a31b7d956e958f1b51e80f6cb91858e416c95d.tar.xz
Merge branch 'aw/rebase-i-edit-todo'
Teach an option to edit the insn sheet to "git rebase -i". * aw/rebase-i-edit-todo: rebase -i: suggest using --edit-todo to fix an unknown instruction rebase -i: Add tests for "--edit-todo" rebase -i: Teach "--edit-todo" action rebase -i: Refactor help messages for todo file rebase usage: subcommands can not be combined with -i
Diffstat (limited to 't/t3404-rebase-interactive.sh')
-rwxr-xr-xt/t3404-rebase-interactive.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index 7a7176088..32fdc9938 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -922,4 +922,22 @@ test_expect_success 'rebase -i --root fixup root commit' '
test 0 = $(git cat-file commit HEAD | grep -c ^parent\ )
'
+test_expect_success 'rebase --edit-todo does not works on non-interactive rebase' '
+ git reset --hard &&
+ git checkout conflict-branch &&
+ test_must_fail git rebase --onto HEAD~2 HEAD~ &&
+ test_must_fail git rebase --edit-todo &&
+ git rebase --abort
+'
+
+test_expect_success 'rebase --edit-todo can be used to modify todo' '
+ git reset --hard &&
+ git checkout no-conflict-branch^0 &&
+ FAKE_LINES="edit 1 2 3" git rebase -i HEAD~3 &&
+ FAKE_LINES="2 1" git rebase --edit-todo &&
+ git rebase --continue
+ test M = $(git cat-file commit HEAD^ | sed -ne \$p) &&
+ test L = $(git cat-file commit HEAD | sed -ne \$p)
+'
+
test_done