Skip to content

Commit 1fa857d

Browse files
committed
sequencer (rebase -i): suggest --edit-todo upon unknown command
This is the same behavior as known from `git rebase -i`. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 7945353 commit 1fa857d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

sequencer.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1228,8 +1228,12 @@ static int parse_insn_buffer(char *buf, struct todo_list *todo_list,
12281228

12291229
item = append_todo(todo_list);
12301230
item->offset_in_buf = p - todo_list->buf.buf;
1231-
if (parse_insn_line(item, p, eol))
1231+
if (parse_insn_line(item, p, eol)) {
1232+
if (IS_REBASE_I())
1233+
return error("Please fix this using "
1234+
"'git rebase --edit-todo'.");
12321235
return error(_("Could not parse line %d."), i);
1236+
}
12331237
if (fixup_okay)
12341238
; /* do nothing */
12351239
else if (is_fixup(item->command))

0 commit comments

Comments
 (0)