summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2018-11-02 11:04:58 +0900
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-11-02 11:04:58 +0900
commit789b1f70422d5c9ffb3a0ecb11284aa0ac13985e (patch)
tree23d8b90cefd141b667962c4fcdf70968c91eeb42 /t
parentMerge branch 'js/rebase-autostash-fix' (diff)
parentrebase -i: introduce the 'break' command (diff)
downloadtgif-789b1f70422d5c9ffb3a0ecb11284aa0ac13985e.tar.xz
Merge branch 'js/rebase-i-break'
"git rebase -i" learned a new insn, 'break', that the user can insert in the to-do list. Upon hitting it, the command returns control back to the user. * js/rebase-i-break: rebase -i: introduce the 'break' command rebase -i: clarify what happens on a failed `exec`
Diffstat (limited to 't')
-rw-r--r--t/lib-rebase.sh2
-rwxr-xr-xt/t3418-rebase-continue.sh9
2 files changed, 10 insertions, 1 deletions
diff --git a/t/lib-rebase.sh b/t/lib-rebase.sh
index 2ca9fb69d6..241f64b09b 100644
--- a/t/lib-rebase.sh
+++ b/t/lib-rebase.sh
@@ -49,7 +49,7 @@ set_fake_editor () {
case $line in
pick|squash|fixup|edit|reword|drop)
action="$line";;
- exec*)
+ exec*|break)
echo "$line" | sed 's/_/ /g' >> "$1";;
"#")
echo '# comment' >> "$1";;
diff --git a/t/t3418-rebase-continue.sh b/t/t3418-rebase-continue.sh
index 25099d715c..75cd2d80df 100755
--- a/t/t3418-rebase-continue.sh
+++ b/t/t3418-rebase-continue.sh
@@ -241,5 +241,14 @@ test_rerere_autoupdate -m
GIT_SEQUENCE_EDITOR=: && export GIT_SEQUENCE_EDITOR
test_rerere_autoupdate -i
test_rerere_autoupdate --preserve-merges
+unset GIT_SEQUENCE_EDITOR
+
+test_expect_success 'the todo command "break" works' '
+ rm -f execed &&
+ FAKE_LINES="break exec_>execed" git rebase -i HEAD &&
+ test_path_is_missing execed &&
+ git rebase --continue &&
+ test_path_is_file execed
+'
test_done