summaryrefslogtreecommitdiff
path: root/send-pack.c
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2005-12-21 16:53:29 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-12-21 20:22:43 (GMT)
commit9470657ad0d0472e3e3c2e352334f60e7bd777c1 (patch)
tree9d8e1fe1eab8d33cefdb1190e70bb6916db00a19 /send-pack.c
parent455c161c47542de7e67d2ba48bba637e5a645388 (diff)
downloadgit-9470657ad0d0472e3e3c2e352334f60e7bd777c1.zip
git-9470657ad0d0472e3e3c2e352334f60e7bd777c1.tar.gz
git-9470657ad0d0472e3e3c2e352334f60e7bd777c1.tar.bz2
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>
Diffstat (limited to 'send-pack.c')
-rw-r--r--send-pack.c2
1 files changed, 1 insertions, 1 deletions
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, 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;