Skip to content

Commit cf2ad8e

Browse files
committed
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 <[email protected]> Acked-by: Shawn O. Pearce <[email protected]>
1 parent 3e63b21 commit cf2ad8e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

upload-pack.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -640,15 +640,16 @@ static int send_ref(const char *refname, const unsigned char *sha1, int flag, vo
640640
{
641641
static const char *capabilities = "multi_ack thin-pack side-band"
642642
" side-band-64k ofs-delta shallow no-progress"
643-
" include-tag multi_ack_detailed no-done";
643+
" include-tag multi_ack_detailed";
644644
struct object *o = parse_object(sha1);
645645

646646
if (!o)
647647
die("git upload-pack: cannot find object %s:", sha1_to_hex(sha1));
648648

649649
if (capabilities)
650-
packet_write(1, "%s %s%c%s\n", sha1_to_hex(sha1), refname,
651-
0, capabilities);
650+
packet_write(1, "%s %s%c%s%s\n", sha1_to_hex(sha1), refname,
651+
0, capabilities,
652+
stateless_rpc ? " no-done" : "");
652653
else
653654
packet_write(1, "%s %s\n", sha1_to_hex(sha1), refname);
654655
capabilities = NULL;

0 commit comments

Comments
 (0)