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

[PATCH v2 07/13] promisor-remote: use repository_format_partial_clone

From
Christian Couder <christian.couder@gmail.com>
Date
Jan 22, 2019, 14:42 UTC
Message-ID
<20190122144212.15119-8-chriscool@tuxfamily.org>
In-Reply-To
<20190122144212.15119-1-chriscool@tuxfamily.org>

A remote specified using the extensions.partialClone config option should be considered a promisor remote too.

This remote should be at the end of the promisor remote list, so that it is used only if objects have not been found in other remotes.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
---
 promisor-remote.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
diff --git a/promisor-remote.c b/promisor-remote.c
index ea74f6d8a8..dcf6ef6521 100644
--- a/promisor-remote.c
+++ b/promisor-remote.c
@@ -83,6 +83,17 @@ static void promisor_remote_do_init(int force)
 	initialized = 1;
 
 	git_config(promisor_remote_config, NULL);
+
+	if (repository_format_partial_clone) {
+		struct promisor_remote *o, *previous;
+
+		o = promisor_remote_look_up(repository_format_partial_clone,
+					    &previous);
+		if (o)
+			promisor_remote_move_to_tail(o, previous);
+		else
+			promisor_remote_new(repository_format_partial_clone);
+	}
 }
 
 static inline void promisor_remote_init(void)
-- 
2.20.1.322.gd6b9ae60d4
Previous: Christian CouderNext: Christian Couder
Message 6 of 14 in “Many promisor remotes”
  1. 00/13 Many promisor remotesChristian Couder, Jan 22, 2019
  2. 01/13 fetch: fix extensions.partialclone name in error messageChristian Couder, Jan 22, 2019
  3. 02/13 partial-clone: add missing 'is' in docChristian Couder, Jan 22, 2019
  4. 03/13 fetch-object: make functions return an error codeChristian Couder, Jan 22, 2019
  5. 06/13 promisor-remote: add promisor_remote_reinit()Christian Couder, Jan 22, 2019
  6. 07/13 promisor-remote: use repository_format_partial_cloneChristian Couder, Jan 22, 2019
  7. 05/13 promisor-remote: implement promisors_get_direct()Christian Couder, Jan 22, 2019
  8. 04/13 Add initial support for many promisor remotesChristian Couder, Jan 22, 2019
  9. 11/13 t0410: test fetching from many promisor remotesChristian Couder, Jan 22, 2019
  10. 13/13 remote: add promisor and partial clone config to the docChristian Couder, Jan 22, 2019
  11. 09/13 promisor-remote: parse remote.*.partialclonefilterChristian Couder, Jan 22, 2019
  12. 10/13 builtin/fetch: remove unique promisor remote limitationChristian Couder, Jan 22, 2019
  13. 08/13 Use promisor_remote_get_direct() and has_promisor_remote()Christian Couder, Jan 22, 2019
  14. 12/13 partial-clone: add multiple remotes in the docChristian Couder, Jan 22, 2019

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.