sequencer (rebase -i): leave a patch upon error
[gitweb.git] / sequencer.c
index 80b2b2a975b8f836784639cdb9249f449e8195ac..a2002f1c12e44189397dd0527cf7cb9f2703a5dc 100644 (file)
@@ -1769,7 +1769,9 @@ static int pick_commits(struct todo_list *todo_list, struct replay_opts *opts)
                                        intend_to_amend();
                                return error_failed_squash(item->commit, opts,
                                        item->arg_len, item->arg);
-                       }
+                       } else if (res && is_rebase_i(opts))
+                               return res | error_with_patch(item->commit,
+                                       item->arg, item->arg_len, opts, res, 0);
                } else if (item->command == TODO_EXEC) {
                        char *end_of_arg = (char *)(item->arg + item->arg_len);
                        int saved = *end_of_arg;