[v1,5/8] promisor-remote: use repository_format_partial_clone
diff mbox series

Message ID 20181211052746.16218-6-chriscool@tuxfamily.org
State New
Headers show
Series
  • Many promisor remotes
Related show

Commit Message

Christian Couder Dec. 11, 2018, 5:27 a.m. UTC
A remote specified using the extensions.partialClone config
option should be considered a promisor remote too.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
---
 promisor-remote.c | 5 +++++
 1 file changed, 5 insertions(+)

Patch
diff mbox series

diff --git a/promisor-remote.c b/promisor-remote.c
index ca2b8bf6bb..e4a0625426 100644
--- a/promisor-remote.c
+++ b/promisor-remote.c
@@ -73,6 +73,11 @@  static void promisor_remote_do_init(int force)
 	initialized = 1;
 
 	git_config(promisor_remote_config, NULL);
+
+	if (repository_format_partial_clone &&
+	    !do_find_promisor_remote(repository_format_partial_clone))
+		promisor_remote_new(repository_format_partial_clone,
+				    strlen(repository_format_partial_clone));
 }
 
 static inline void promisor_remote_init(void)