From: Johannes Schindelin Date: Wed, 21 Dec 2005 16:53:29 +0000 (+0100) Subject: Avoid misleading success message on error X-Git-Tag: v1.0.0a~2 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=9470657ad0d0472e3e3c2e352334f60e7bd777c1;p=git.git Avoid misleading success message on error 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 Signed-off-by: Junio C Hamano --- diff --git a/send-pack.c b/send-pack.c index a41bbe5e..5bc2f017 100644 --- a/send-pack.c +++ b/send-pack.c @@ -272,7 +272,7 @@ static int send_pack(int in, int out, int nr_refspec, char **refspec) 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;