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

[PATCH] upload-pack: Exit when server finishes sending shallow-update in stateless RPC mode

From
Stan Hu <stanhu@gmail.com>
Date
Apr 12, 2016, 04:55 UTC
Message-ID
<1460436940-16165-1-git-send-email-stanhu@gmail.com>

In the stateless RPC case, the server should respond to the client's depth request with the set of commits which are no deeper than the desired depth. Once this finishes, the server should terminate and receive the reply in another POST request.

Previously the server would sit idle and die when it detected the client closed the connection.

Signed-off-by: Stan Hu <stanhu@gmail.com>
---
 upload-pack.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/upload-pack.c b/upload-pack.c
index b3f6653..4fb1e60 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -676,6 +676,8 @@ static void receive_needs(void)
 			register_shallow(object->oid.hash);
 		}
 		packet_flush(1);
+		if (stateless_rpc)
+			exit(0);
 	} else
 		if (shallows.nr > 0) {
 			int i;
-- 
2.7.3
Next: Torsten Bögershausen
Message 1 of 2 in “upload-pack: Exit when server finishes sending shallow-update in stateless RPC mode”
  1. upload-pack: Exit when server finishes sending shallow-update in stateless RPC modeStan Hu, Apr 12, 2016
  2. Torsten BögershausenApr 12, 2016

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.