Code

Document the --histogram diff option
[git.git] / remote-curl.c
index 5798aa57b6bf7f47f4fd9c8b943602faaeee4b95..0aa4bfed309d6c439fac4ff2a0df6a468307e7bf 100644 (file)
@@ -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++)