threads / patch / 2896

patchAvoid misleading success message on error

Subject: [PATCH] Avoid misleading success message on error

## tl;dr

2 messages between Dec 21, 2005 and Dec 21, 2005. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

Johannes Schindelin· Dec 21, 2005, 16:53 UTC · lore

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
Show changes to send-pack.c +1 −1
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
Junio C Hamano· Dec 21, 2005, 20:47 UTC · re: Johannes Schindelin · lore

Re: [PATCH] Avoid misleading success message on error

Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> 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".
Thanks.

← back to recent threads