diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-03-29 10:24:59 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-03-29 12:21:28 -0700 |
commit | cf2ad8e64175bcf4b2bb693a9e4c0a89076111dd (patch) | |
tree | adbe0bcb88663beea23c4a880195d800186646e0 /upload-pack.c | |
parent | 3e63b21aced116badd30a279c479535449a63560 (diff) | |
download | git-cf2ad8e64175bcf4b2bb693a9e4c0a89076111dd.tar.gz |
enable "no-done" extension only when serving over smart-http
Do not advertise no-done capability when upload-pack is not serving over
smart-http, as there is no way for this server to know when it should stop
reading in-flight data from the client, even though it is necessary to
drain all the in-flight data in order to unblock the client.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'upload-pack.c')
-rw-r--r-- | upload-pack.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/upload-pack.c b/upload-pack.c index 5924f6f988..a247fb9e27 100644 --- a/upload-pack.c +++ b/upload-pack.c @@ -640,15 +640,16 @@ static int send_ref(const char *refname, const unsigned char *sha1, int flag, vo { static const char *capabilities = "multi_ack thin-pack side-band" " side-band-64k ofs-delta shallow no-progress" - " include-tag multi_ack_detailed no-done"; + " include-tag multi_ack_detailed"; struct object *o = parse_object(sha1); if (!o) die("git upload-pack: cannot find object %s:", sha1_to_hex(sha1)); if (capabilities) - packet_write(1, "%s %s%c%s\n", sha1_to_hex(sha1), refname, - 0, capabilities); + packet_write(1, "%s %s%c%s%s\n", sha1_to_hex(sha1), refname, + 0, capabilities, + stateless_rpc ? " no-done" : ""); else packet_write(1, "%s %s\n", sha1_to_hex(sha1), refname); capabilities = NULL; |