The cherry-pick/ revert machinery now removes the sequencer state when do_pick_commit returns a non-zero, and when only one instruction is left in the todo_list. Since do_pick_commit has a way to distinguish errors from conflicts using the signed-ness of the return value, utilize this to ensure that the sequencer state is only removed when there's a conflict and there is only one instruction left in the todo_list. Signed-off-by: Ramkumar Ramachandra <artagnon@xxxxxxxxx> --- builtin/revert.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/builtin/revert.c b/builtin/revert.c index 8b452e8..a548a14 100644 --- a/builtin/revert.c +++ b/builtin/revert.c @@ -929,10 +929,10 @@ static int pick_commits(struct commit_list *todo_list, struct replay_opts *opts) save_todo(cur, opts); res = do_pick_commit(cur->item, opts); if (res) { - if (!cur->next) + if (!cur->next && res > 0) /* - * An error was encountered while - * picking the last commit; the + * A conflict was encountered while + * picking the last commit. The * sequencer state is useless now -- * the user simply needs to resolve * the conflict and commit -- 1.7.6.351.gb35ac.dirty -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html