summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-11-02 02:04:53 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-11-02 02:04:53 (GMT)
commitb49ef560ed66449d24a3fdfe25972c390bb44951 (patch)
tree60534d673f60750d6cc4ef2a709ef7a847fc7cdf /t
parent5ae50845d8a30d7db32e139ce04b712f9deb99cd (diff)
parent34b47315d9721a576b9536492cca0c11588113a2 (diff)
downloadgit-b49ef560ed66449d24a3fdfe25972c390bb44951.zip
git-b49ef560ed66449d24a3fdfe25972c390bb44951.tar.gz
git-b49ef560ed66449d24a3fdfe25972c390bb44951.tar.bz2
Merge branch 'ag/rebase-i-in-c'
Rewrite of the remaining "rebase -i" machinery in C. * ag/rebase-i-in-c: rebase -i: move rebase--helper modes to rebase--interactive rebase -i: remove git-rebase--interactive.sh rebase--interactive2: rewrite the submodes of interactive rebase in C rebase -i: implement the main part of interactive rebase as a builtin rebase -i: rewrite init_basic_state() in C rebase -i: rewrite write_basic_state() in C rebase -i: rewrite the rest of init_revisions_and_shortrevisions() in C rebase -i: implement the logic to initialize $revisions in C rebase -i: remove unused modes and functions rebase -i: rewrite complete_action() in C t3404: todo list with commented-out commands only aborts sequencer: change the way skip_unnecessary_picks() returns its result sequencer: refactor append_todo_help() to write its message to a buffer rebase -i: rewrite checkout_onto() in C rebase -i: rewrite setup_reflog_action() in C sequencer: add a new function to silence a command, except if it fails rebase -i: rewrite the edit-todo functionality in C editor: add a function to launch the sequence editor rebase -i: rewrite append_todo_help() in C sequencer: make three functions and an enum from sequencer.c public
Diffstat (limited to 't')
-rwxr-xr-xt/t3404-rebase-interactive.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index ff89b63..d60e59e 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -75,6 +75,16 @@ test_expect_success 'rebase --keep-empty' '
test_line_count = 6 actual
'
+cat > expect <<EOF
+error: nothing to do
+EOF
+
+test_expect_success 'rebase -i with empty HEAD' '
+ set_fake_editor &&
+ test_must_fail env FAKE_LINES="1 exec_true" git rebase -i HEAD^ >actual 2>&1 &&
+ test_i18ncmp expect actual
+'
+
test_expect_success 'rebase -i with the exec command' '
git checkout master &&
(