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>
This commit is contained in:
parent
455c161c47
commit
9470657ad0
@ -272,7 +272,7 @@ static int send_pack(int in, int out, int nr_refspec, char **refspec)
|
|||||||
packet_flush(out);
|
packet_flush(out);
|
||||||
if (new_refs)
|
if (new_refs)
|
||||||
pack_objects(out, remote_refs);
|
pack_objects(out, remote_refs);
|
||||||
else
|
else if (ret == 0)
|
||||||
fprintf(stderr, "Everything up-to-date\n");
|
fprintf(stderr, "Everything up-to-date\n");
|
||||||
close(out);
|
close(out);
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
Reference in New Issue
Block a user