Skip to content

Commit

Permalink
Avoid misleading success message on error
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johannes Schindelin authored and Junio C Hamano committed Dec 21, 2005
1 parent 455c161 commit 9470657
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion send-pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9470657

Please sign in to comment.