From: Junio C Hamano Date: Tue, 29 Mar 2011 17:16:29 +0000 (-0700) Subject: enable "no-done" extension only when fetching over smart-http X-Git-Tag: v1.7.5-rc0~6^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8e9182e09127b20b8d8ce19655037991feac798d;p=git.git enable "no-done" extension only when fetching over smart-http When 'no-done' protocol extension is used, the upload-pack (i.e. the server side) process stops listening to the fetch-pack after issuing the final NAK, and starts sending the generated pack data back, but there may be more "have" send by the latter in flight that the fetch-pack is expecting to be responded with ACK/NAK. This will typically result in a deadlock (both will block on write that the other end never reads) or SIGPIPE on the fetch-pack end (upload-pack will finish writing a small pack and goes away). Disable it unless fetch-pack is running under smart-http, where there is no such streaming issue. Signed-off-by: Junio C Hamano Acked-by: Shawn O. Pearce --- diff --git a/builtin/fetch-pack.c b/builtin/fetch-pack.c index 59fbda522..52707a80a 100644 --- a/builtin/fetch-pack.c +++ b/builtin/fetch-pack.c @@ -708,7 +708,8 @@ static struct ref *do_fetch_pack(int fd[2], if (server_supports("no-done")) { if (args.verbose) fprintf(stderr, "Server supports no-done\n"); - no_done = 1; + if (args.stateless_rpc) + no_done = 1; } } else if (server_supports("multi_ack")) {