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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Schindelin committed
Jan 2, 2017 at 16:35 UTC
27fdbb96aae789105dadbddbfa9bccce8f88d3c8
1 file changed
+5
-1
sequencer.c
+5
-1
@@ -1314,8 +1314,12 @@ static int read_populate_todo(struct todo_list *todo_list,
1314
close(fd);
1315
1316
res = parse_insn_buffer(todo_list->buf.buf, todo_list);
1317
- if (res)
1317
+ if (res) {
1318
+ if (is_rebase_i(opts))
1319
+ return error(_("please fix this using "
1320
+ "'git rebase --edit-todo'."));
1321
return error(_("unusable instruction sheet: '%s'"), todo_file);
1322
+ }
1323
1324
if (!todo_list->nr &&
1325
(!is_rebase_i(opts) || !file_exists(rebase_path_done())))