@matheusbsbs / matheus-bagliano / commits / 3b2c5b6df4
Fork 0

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>

Christian Couder committed Jul 14, 2010 at 01:28 UTC 3b2c5b6df4be14cac6b36cf0db0468efa1f42916
1 file changed +5 -12
builtin/revert.c
+5 -12
@@ -518,24 +518,17 @@ static int do_pick_commit(void)
518 mebuf.buf, help_msg());
519 rerere(allow_rerere_auto);
520 } else {
521 - fprintf(stderr, "Finished one %s.\n", mebuf.buf);
521 + if (!no_commit)
522 + res = run_git_commit(defmsg);
523 + if (!res)
524 + fprintf(stderr, "Finished one %s.\n", mebuf.buf);
525 }
526
527 strbuf_release(&mebuf);
528 free_message(&msg);
526 -
527 - if (res)
528 - return 1;
529 -
530 - if (!no_commit) {
531 - res = run_git_commit(defmsg);
532 - free(defmsg);
533 - return res;
534 - }
535 -
529 free(defmsg);
530
538 - return 0;
531 + return res;
532 }
533
534 static void prepare_revs(struct rev_info *revs)