summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJohannes Sixt <j6t@kdbg.org>2018-10-25 20:47:45 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-10-26 01:20:23 (GMT)
commit3a4a4cab3ef024e10af7a5bbcaed4b961c60f1db (patch)
tree845fa7bba14ed40fbc833f3f7a999a684ffd1557 /t
parent71f82465b1c9546a09c442c3c9aa22ecbb76f820 (diff)
downloadgit-3a4a4cab3ef024e10af7a5bbcaed4b961c60f1db.zip
git-3a4a4cab3ef024e10af7a5bbcaed4b961c60f1db.tar.gz
git-3a4a4cab3ef024e10af7a5bbcaed4b961c60f1db.tar.bz2
rebase -i: recognize short commands without arguments
The sequencer instruction 'b', short for 'break', is rejected: error: invalid line 2: b The reason is that the parser expects all short commands to have an argument. Permit short commands without arguments. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rw-r--r--t/lib-rebase.sh2
-rwxr-xr-xt/t3418-rebase-continue.sh4
2 files changed, 4 insertions, 2 deletions
diff --git a/t/lib-rebase.sh b/t/lib-rebase.sh
index 584604e..8657243 100644
--- a/t/lib-rebase.sh
+++ b/t/lib-rebase.sh
@@ -49,7 +49,7 @@ set_fake_editor () {
case $line in
squash|fixup|edit|reword|drop)
action="$line";;
- exec*|break)
+ exec*|break|b)
echo "$line" | sed 's/_/ /g' >> "$1";;
"#")
echo '# comment' >> "$1";;
diff --git a/t/t3418-rebase-continue.sh b/t/t3418-rebase-continue.sh
index 185a491..b282505 100755
--- a/t/t3418-rebase-continue.sh
+++ b/t/t3418-rebase-continue.sh
@@ -243,7 +243,9 @@ unset GIT_SEQUENCE_EDITOR
test_expect_success 'the todo command "break" works' '
rm -f execed &&
- FAKE_LINES="break exec_>execed" git rebase -i HEAD &&
+ FAKE_LINES="break b exec_>execed" git rebase -i HEAD &&
+ test_path_is_missing execed &&
+ git rebase --continue &&
test_path_is_missing execed &&
git rebase --continue &&
test_path_is_file execed