git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 3/4] revert: don't print "Finished one cherry-pick." if commit failed

From
Christian Couder <chriscool@tuxfamily.org>
Date
Jul 13, 2010, 23:28 UTC
Message-ID
<20100713232816.7738.202.chriscool@tuxfamily.org>
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: Jonathan Nieder
Message 1 of 2 in “revert: don't print "Finished one cherry-pick." if commit failed”
  1. 3/4 revert: don't print "Finished one cherry-pick." if commit failedChristian Couder, Jul 13, 2010
  2. Jonathan NiederJul 15, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.