summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sequencer.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sequencer.c b/sequencer.c
index 000ce3e541..bd11db4273 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -962,7 +962,10 @@ 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)
+ return error(_("Unusable instruction sheet: %s"), todo_file);
+
+ if (!is_rebase_i(opts)) {
enum todo_command valid =
opts->action == REPLAY_PICK ? TODO_PICK : TODO_REVERT;
int i;
@@ -976,8 +979,6 @@ static int read_populate_todo(struct todo_list *todo_list,
return error(_("Cannot revert during a cherry-pick."));
}
- if (res)
- return error(_("Unusable instruction sheet: %s"), todo_file);
return 0;
}