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>
This commit is contained in:

committed by
Junio C Hamano

parent
71f82465b1
commit
3a4a4cab3e
@ -1954,7 +1954,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;
|
||||
|
Reference in New Issue
Block a user