Skip to content

Commit

Permalink
revert: don't print "Finished one cherry-pick." if commit failed
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Christian Couder authored and Junio C Hamano committed Jul 16, 2010
1 parent 5df1645 commit 3b2c5b6
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions builtin/revert.c
Original file line number Diff line number Diff line change
Expand Up @@ -518,24 +518,17 @@ static int do_pick_commit(void)
mebuf.buf, help_msg());
rerere(allow_rerere_auto);
} else {
fprintf(stderr, "Finished one %s.\n", mebuf.buf);
if (!no_commit)
res = run_git_commit(defmsg);
if (!res)
fprintf(stderr, "Finished one %s.\n", mebuf.buf);
}

strbuf_release(&mebuf);
free_message(&msg);

if (res)
return 1;

if (!no_commit) {
res = run_git_commit(defmsg);
free(defmsg);
return res;
}

free(defmsg);

return 0;
return res;
}

static void prepare_revs(struct rev_info *revs)
Expand Down

0 comments on commit 3b2c5b6

Please sign in to comment.