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

[PATCH 2/2] Resumable clone: add endpoints for prime clone (Draft)

From
KWKevin Wern <kevin.m.wern@gmail.com>
Date
May 19, 2016, 05:07 UTC
Message-ID
<1463634450-28265-3-git-send-email-kevin.m.wern@gmail.com>
In-Reply-To
<1463634450-28265-1-git-send-email-kevin.m.wern@gmail.com>
Add endpoints for prime-clone in http service and git daemon
---
 daemon.c       | 7 +++++++
 http-backend.c | 1 +
 2 files changed, 8 insertions(+)
diff --git a/daemon.c b/daemon.c
index 8d45c33..2ddc7f7 100644
--- a/daemon.c
+++ b/daemon.c
@@ -475,10 +475,17 @@ static int receive_pack(void)
 	return run_service_command(argv);
 }
 
+static int prime_clone(void)
+{
+	static const char *argv[] = { "prime-clone", ".", NULL };
+	return run_service_command(argv);
+}
+
 static struct daemon_service daemon_service[] = {
 	{ "upload-archive", "uploadarch", upload_archive, 0, 1 },
 	{ "upload-pack", "uploadpack", upload_pack, 1, 1 },
 	{ "receive-pack", "receivepack", receive_pack, 0, 1 },
+	{ "prime-clone", "primeclone", prime_clone, 0, 1 },
 };
 
 static void enable_service(const char *name, int ena)
diff --git a/http-backend.c b/http-backend.c
index 2148814..a338e2a 100644
--- a/http-backend.c
+++ b/http-backend.c
@@ -27,6 +27,7 @@ struct rpc_service {
 static struct rpc_service rpc_service[] = {
 	{ "upload-pack", "uploadpack", 1, 1 },
 	{ "receive-pack", "receivepack", 0, -1 },
+	{ "prime-clone", "primeclone", 0, -1 },
 };
 
 static struct string_list *get_parameters(void)
-- 
1.9.1
Previous: Kevin Wern
Message 3 of 3 in “git-prime-clone”
  1. 0/2 git-prime-cloneKevin Wern, May 19, 2016
  2. 1/2 Resumable clone: create git-prime-clone (Draft)Kevin Wern, May 19, 2016
  3. 2/2 Resumable clone: add endpoints for prime clone (Draft)Kevin Wern, May 19, 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.