summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-09-30 05:28:12 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-09-30 05:28:12 (GMT)
commit68a31b7d956e958f1b51e80f6cb91858e416c95d (patch)
tree8b260e1da7ef80c08a1535c2f719d15bfc7f9178 /t
parentf5fd2a7d179a8bb843ec44d2a594e6ccf50dfb3a (diff)
parent9c8e1011b9f6979777946ff87aae7b5846ed20a7 (diff)
downloadgit-68a31b7d956e958f1b51e80f6cb91858e416c95d.zip
git-68a31b7d956e958f1b51e80f6cb91858e416c95d.tar.gz
git-68a31b7d956e958f1b51e80f6cb91858e416c95d.tar.bz2
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')
-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 7a71760..32fdc99 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