summaryrefslogtreecommitdiff
path: root/sequencer.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-11-02 02:04:59 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-11-02 02:04:59 (GMT)
commit85fcf1cbb6eb2e8fb1512a5ffe834b6a07deb4cd (patch)
treef88809b7b7bf00832305a28ac1a76044e26f1ba1 /sequencer.c
parent789b1f70422d5c9ffb3a0ecb11284aa0ac13985e (diff)
parent3a4a4cab3ef024e10af7a5bbcaed4b961c60f1db (diff)
downloadgit-85fcf1cbb6eb2e8fb1512a5ffe834b6a07deb4cd.zip
git-85fcf1cbb6eb2e8fb1512a5ffe834b6a07deb4cd.tar.gz
git-85fcf1cbb6eb2e8fb1512a5ffe834b6a07deb4cd.tar.bz2
Merge branch 'js/rebase-i-shortopt'
"git rebase -i" learned to take 'b' as the short form of 'break' option in the todo list. * js/rebase-i-shortopt: rebase -i: recognize short commands without arguments
Diffstat (limited to 'sequencer.c')
-rw-r--r--sequencer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sequencer.c b/sequencer.c
index 73efa92..9e1ab3a 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -1994,7 +1994,8 @@ static int parse_insn_line(struct todo_item *item, const char *bol, char *eol)
if (skip_prefix(bol, todo_command_info[i].str, &bol)) {
item->command = i;
break;
- } else if (bol[1] == ' ' && *bol == todo_command_info[i].c) {
+ } else if ((bol + 1 == eol || bol[1] == ' ') &&
+ *bol == todo_command_info[i].c) {
bol++;
item->command = i;
break;