summaryrefslogtreecommitdiff
path: root/promisor-remote.c
diff options
context:
space:
mode:
authorChristian Couder <christian.couder@gmail.com>2019-06-25 15:40:32 +0200
committerJunio C Hamano <gitster@pobox.com>2019-06-25 14:05:37 -0700
commitfa3d1b63e866d6b893934ab69da10b4516150cdc (patch)
tree1c2d2ea0f162fb34e10a9c46f97897768e029e97 /promisor-remote.c
parentb14ed5adaf87c5943433fd6b1d2cbe8c060f9264 (diff)
downloadgit-fa3d1b63e866d6b893934ab69da10b4516150cdc.tar.gz
promisor-remote: parse remote.*.partialclonefilter
This makes it possible to specify a different partial clone filter for each promisor remote. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'promisor-remote.c')
-rw-r--r--promisor-remote.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/promisor-remote.c b/promisor-remote.c
index 6a8856f475..826890f7b8 100644
--- a/promisor-remote.c
+++ b/promisor-remote.c
@@ -75,6 +75,21 @@ static int promisor_remote_config(const char *var, const char *value, void *data
free(remote_name);
return 0;
}
+ if (!strcmp(subkey, "partialclonefilter")) {
+ struct promisor_remote *r;
+ char *remote_name = xmemdupz(name, namelen);
+
+ r = promisor_remote_lookup(remote_name, NULL);
+ if (!r)
+ r = promisor_remote_new(remote_name);
+
+ free(remote_name);
+
+ if (!r)
+ return 0;
+
+ return git_config_string(&r->partial_clone_filter, var, value);
+ }
return 0;
}