summaryrefslogtreecommitdiff
path: root/promisor-remote.c
diff options
context:
space:
mode:
authorChristian Couder <christian.couder@gmail.com>2019-06-25 15:40:39 +0200
committerJunio C Hamano <gitster@pobox.com>2019-06-25 14:05:38 -0700
commit4ca9474efa4fd431c07a470513e684c5b2eec34c (patch)
tree8bffb92e3130509f01e020ac613adcb2f1d48a48 /promisor-remote.c
parent60b7a92d846a6cc542f96fa0045735cc0b9265fd (diff)
downloadgit-4ca9474efa4fd431c07a470513e684c5b2eec34c.tar.gz
Move core_partial_clone_filter_default to promisor-remote.c
Now that we can have a different default partial clone filter for each promisor remote, let's hide core_partial_clone_filter_default as a static in promisor-remote.c to avoid it being use for anything other than managing backward compatibility. 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.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/promisor-remote.c b/promisor-remote.c
index 31d51bb50e..9bc296cdde 100644
--- a/promisor-remote.c
+++ b/promisor-remote.c
@@ -5,6 +5,7 @@
#include "transport.h"
static char *repository_format_partial_clone;
+static const char *core_partial_clone_filter_default;
void set_repository_format_partial_clone(char *partial_clone)
{
@@ -103,6 +104,10 @@ static int promisor_remote_config(const char *var, const char *value, void *data
int namelen;
const char *subkey;
+ if (!strcmp(var, "core.partialclonefilter"))
+ return git_config_string(&core_partial_clone_filter_default,
+ var, value);
+
if (parse_config_key(var, "remote", &name, &namelen, &subkey) < 0)
return 0;