diff options
Diffstat (limited to 'transport.c')
-rw-r--r-- | transport.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/transport.c b/transport.c index fb653c654a..260350b5a6 100644 --- a/transport.c +++ b/transport.c @@ -791,6 +791,7 @@ static int git_transport_push(struct transport *transport, struct ref *remote_re args.verbose = !!(flags & TRANSPORT_PUSH_VERBOSE); args.quiet = !!(flags & TRANSPORT_PUSH_QUIET); args.dry_run = !!(flags & TRANSPORT_PUSH_DRY_RUN); + args.porcelain = !!(flags & TRANSPORT_PUSH_PORCELAIN); ret = send_pack(&args, data->fd, data->conn, remote_refs, &data->extra_have); @@ -1035,7 +1036,7 @@ int transport_push(struct transport *transport, int quiet = flags & TRANSPORT_PUSH_QUIET; int porcelain = flags & TRANSPORT_PUSH_PORCELAIN; int pretend = flags & TRANSPORT_PUSH_DRY_RUN; - int ret, err; + int push_ret, ret, err; if (flags & TRANSPORT_PUSH_ALL) match_flags |= MATCH_REFS_ALL; @@ -1051,10 +1052,9 @@ int transport_push(struct transport *transport, flags & TRANSPORT_PUSH_MIRROR, flags & TRANSPORT_PUSH_FORCE); - ret = transport->push_refs(transport, remote_refs, flags); + push_ret = transport->push_refs(transport, remote_refs, flags); err = push_had_errors(remote_refs); - - ret |= err; + ret = push_ret | err; if (!quiet || err) print_push_status(transport->url, remote_refs, @@ -1070,8 +1070,11 @@ int transport_push(struct transport *transport, update_tracking_ref(transport->remote, ref, verbose); } - if (!quiet && !ret && !refs_pushed(remote_refs)) + if (porcelain && !push_ret) + puts("Done"); + else if (!quiet && !ret && !refs_pushed(remote_refs)) fprintf(stderr, "Everything up-to-date\n"); + return ret; } return 1; |