From: Christian Couder <chriscool@tuxfamily.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org,
Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Sverre Rabbelier <srabbelier@gmail.com>,
Ramkumar Ramachandra <artagnon@gmail.com>,
Jonathan Nieder <jrnieder@gmail.com>, Jeff King <peff@peff.net>
Subject: [PATCH 3/4] revert: don't print "Finished one cherry-pick." if commit failed
Date: Wed, 14 Jul 2010 01:28:14 +0200 [thread overview]
Message-ID: <20100713232816.7738.202.chriscool@tuxfamily.org> (raw)
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
---
builtin/revert.c | 17 +++++------------
1 files changed, 5 insertions(+), 12 deletions(-)
diff --git a/builtin/revert.c b/builtin/revert.c
index b84b5b8..ec931bd 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)
--
1.7.2.rc1.215.g2dff2.dirty
next reply other threads:[~2010-07-15 9:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-13 23:28 Christian Couder [this message]
2010-07-15 22:42 ` [PATCH 3/4] revert: don't print "Finished one cherry-pick." if commit failed Jonathan Nieder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100713232816.7738.202.chriscool@tuxfamily.org \
--to=chriscool@tuxfamily.org \
--cc=Johannes.Schindelin@gmx.de \
--cc=artagnon@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jrnieder@gmail.com \
--cc=peff@peff.net \
--cc=srabbelier@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).