Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'sp/smart-http-failure'
author
Junio C Hamano
<gitster@pobox.com>
Wed, 12 Oct 2011 19:34:27 +0000
(12:34 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 12 Oct 2011 19:34:27 +0000
(12:34 -0700)
* sp/smart-http-failure:
remote-curl: Fix warning after HTTP failure
remote-curl.c
patch
|
blob
|
history
raw
(from parent 1:
a99c247
)
diff --git
a/remote-curl.c
b/remote-curl.c
index b8cf45a7dd439b83c80bcf7a397e1b8e34c70f67..0aa4bfed309d6c439fac4ff2a0df6a468307e7bf 100644
(file)
--- 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;