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 <johannes.schindelin@gmx.de>
This commit is contained in:
Johannes Schindelin
2016-04-21 12:51:50 +02:00
parent 660acea312
commit fa3efbbadd

View File

@@ -1346,8 +1346,12 @@ static int read_populate_todo(struct todo_list *todo_list,
close(fd);
res = parse_insn_buffer(todo_list->buf.buf, todo_list);
if (res)
if (res) {
if (is_rebase_i(opts))
return error("Please fix this using "
"'git rebase --edit-todo'.");
return error(_("Unusable instruction sheet: %s"), todo_file);
}
if (!todo_list->nr &&
(!is_rebase_i(opts) || !file_exists(rebase_path_done())))
return error(_("No commits parsed."));