X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=remote-curl.c;h=0aa4bfed309d6c439fac4ff2a0df6a468307e7bf;hb=6c65b5ea439165512d128e18829b67688ddab9cc;hp=5798aa57b6bf7f47f4fd9c8b943602faaeee4b95;hpb=b9a77eeda1d7f8a56fb7aed1063956c653d137d1;p=git.git diff --git a/remote-curl.c b/remote-curl.c index 5798aa57b..0aa4bfed3 100644 --- a/remote-curl.c +++ b/remote-curl.c @@ -573,7 +573,14 @@ static int rpc_service(struct rpc_state *rpc, struct discovery *heads) close(client.in); client.in = -1; - strbuf_read(&rpc->result, client.out, 0); + if (!err) { + strbuf_read(&rpc->result, client.out, 0); + } else { + char buf[4096]; + for (;;) + if (xread(client.out, buf, sizeof(buf)) <= 0) + break; + } close(client.out); client.out = -1; @@ -762,9 +769,7 @@ static int push_git(struct discovery *heads, int nr_spec, char **specs) argv[argc++] = "--thin"; if (options.dry_run) argv[argc++] = "--dry-run"; - if (options.verbosity < 0) - argv[argc++] = "--quiet"; - else if (options.verbosity > 1) + if (options.verbosity > 1) argv[argc++] = "--verbose"; argv[argc++] = url; for (i = 0; i < nr_spec; i++)