summaryrefslogtreecommitdiff
path: root/sequencer.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2018-11-02 11:04:59 +0900
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-11-02 11:04:59 +0900
commit85fcf1cbb6eb2e8fb1512a5ffe834b6a07deb4cd (patch)
treef88809b7b7bf00832305a28ac1a76044e26f1ba1 /sequencer.c
parentMerge branch 'js/rebase-i-break' (diff)
parentrebase -i: recognize short commands without arguments (diff)
downloadtgif-85fcf1cbb6eb2e8fb1512a5ffe834b6a07deb4cd.tar.xz
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 73efa92da8..9e1ab3a2a7 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;