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

[PATCH] Avoid misleading success message on error

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Dec 21, 2005, 16:53 UTC
Message-ID
<Pine.LNX.4.63.0512211752340.16125@wbgn013.biozentrum.uni-wuerzburg.de>

When a push fails (for example when the remote head does not fast forward to the desired ref) it is not correct to print "Everything up-to-date".

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
 send-pack.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
67819bb187daa5a976bc3d721d5c9f920f52e4ba
diff --git a/send-pack.c b/send-pack.c
index a41bbe5..5bc2f01 100644
--- a/send-pack.c
+++ b/send-pack.c
@@ -272,7 +272,7 @@ static int send_pack(int in, int out, in
 	packet_flush(out);
 	if (new_refs)
 		pack_objects(out, remote_refs);
-	else
+	else if (ret == 0)
 		fprintf(stderr, "Everything up-to-date\n");
 	close(out);
 	return ret;
-- 
0.99.9.GIT
Next: Junio C Hamano
Message 1 of 2 in “Avoid misleading success message on error”
  1. Avoid misleading success message on errorJohannes Schindelin, Dec 21, 2005
  2. Junio C HamanoDec 21, 2005

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.