1. Stefan Saasen
  2. git


Johannes Schindelin  committed 9470657

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>

  • Participants
  • Parent commits 455c161
  • Branches master

Comments (0)

Files changed (1)

File send-pack.c

View file
  • Ignore whitespace
 	if (new_refs)
 		pack_objects(out, remote_refs);
-	else
+	else if (ret == 0)
 		fprintf(stderr, "Everything up-to-date\n");
 	return ret;