git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] enable "no-done" extension only when serving over smart-http

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 29, 2011, 17:32 UTC
Message-ID
<7vfwq5suhp.fsf@alter.siamese.dyndns.org>
In-Reply-To
<7vlizxsv82.fsf@alter.siamese.dyndns.org>

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>
---
 * Sorry for the resend...
 upload-pack.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/upload-pack.c b/upload-pack.c
index 5924f6f..a247fb9 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;
Previous: Shawn Pearce
Message 5 of 5 in “enable "no-done" extension only when fetching over smart-http”
  1. enable "no-done" extension only when fetching over smart-httpJunio C Hamano, Mar 29, 2011
  2. Shawn PearceMar 29, 2011
  3. enable "no-done" extension only when serving over smart-httpJunio C Hamano, Mar 29, 2011
  4. Shawn PearceMar 29, 2011
  5. enable "no-done" extension only when serving over smart-httpJunio C Hamano, Mar 29, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.