diff options
author | Christian Couder <chriscool@tuxfamily.org> | 2010-07-14 01:28:14 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-07-16 15:22:00 -0700 |
commit | 3b2c5b6df4be14cac6b36cf0db0468efa1f42916 (patch) | |
tree | 251efec533555a15250c419cf3507e03e472be3b /builtin | |
parent | revert: refactor commit code into a new run_git_commit() function (diff) | |
download | tgif-3b2c5b6df4be14cac6b36cf0db0468efa1f42916.tar.xz |
revert: don't print "Finished one cherry-pick." if commit failed
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/revert.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/builtin/revert.c b/builtin/revert.c index b84b5b8645..ec931bdcfc 100644 --- a/builtin/revert.c +++ b/builtin/revert.c @@ -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) |