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;
return error(_("Cannot revert during a cherry-pick."));
}
- if (res)
- return error(_("Unusable instruction sheet: %s"), todo_file);
return 0;
}