@matheusbsbs / matheus-bagliano / commits / 9470657ad0
Fork 0

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 <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>

Johannes Schindelin committed Dec 21, 2005 at 17:53 UTC 9470657ad0d0472e3e3c2e352334f60e7bd777c1
1 file changed +1 -1
send-pack.c
+1 -1
@@ -272,7 +272,7 @@ static int send_pack(int in, int out, int nr_refspec, char **refspec)
272 packet_flush(out);
273 if (new_refs)
274 pack_objects(out, remote_refs);
275 - else
275 + else if (ret == 0)
276 fprintf(stderr, "Everything up-to-date\n");
277 close(out);
278 return ret;