From: Junio C Hamano Date: Mon, 11 Jul 2011 19:58:16 GMT Subject: Re: [PATCH 15/17] revert: Remove sequencer state when no commits are pending Message-ID: <7vvcv8bjmf.fsf@alter.siamese.dyndns.org> In-Reply-To: <1310396048-24925-16-git-send-email-artagnon@gmail.com> Ramkumar Ramachandra writes: > diff --git a/builtin/revert.c b/builtin/revert.c > index f9f5e3a..3936516 100644 > --- a/builtin/revert.c > +++ b/builtin/revert.c > @@ -990,8 +990,18 @@ static int pick_commits(struct commit_list *todo_list, struct replay_opts *opts) > for (cur = todo_list; cur; cur = cur->next) { > save_todo(cur, opts); > res = do_pick_commit(cur->item, opts); > - if (res) > + if (res) { > + if (!cur->next) > + /* > + * An error was encountered while > + * picking the last commit; the > + * sequencer state is useless now -- > + * the user simply needs to resolve > + * the conflict and commit > + */ > + remove_sequencer_state(); > return res; > + } > } It may be useless for --continue, but wouldn't --abort need some clue on what you were doing?