Skip to content

Commit

Permalink
push: indicate partialness of error message
Browse files Browse the repository at this point in the history
The existing message indicates that an error occured during
push, but it is unclear whether _any_ refs were actually
pushed (even though the status table above shows which were
pushed successfully and which were not, the message "failed
to push" implies a total failure). By indicating that "some
refs" failed, we hopefully indicate to the user that the
table above contains the details.

We could also put in an explicit "see above for details"
message, but it seemed to clutter the output quite a bit
(both on a line of its own, or at the end of the error line,
which inevitably wraps).

This could also be made more fancy if the transport
mechanism passed back more details on how many refs
succeeded and failed:

  error: failed to push %d out of %d refs to '%s'

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Jeff King authored and Junio C Hamano committed Feb 20, 2008
1 parent e5fc9a0 commit 2b8130c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builtin-push.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ static int do_push(const char *repo, int flags)
if (!err)
continue;

error("failed to push to '%s'", remote->url[i]);
error("failed to push some refs to '%s'", remote->url[i]);
errs++;
}
return !!errs;
Expand Down

0 comments on commit 2b8130c

Please sign in to comment.