general improvements
[gitweb.git] / promisor-remote.c
index 92c4c12c1cadbed537edc3f4fc6105676c271cca..9bc296cdde2acc3871c0738533decb70c69f1b62 100644 (file)
@@ -4,6 +4,14 @@
 #include "config.h"
 #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)
+{
+       repository_format_partial_clone = xstrdup_or_null(partial_clone);
+}
+
 static int fetch_refs(const char *remote_name, struct ref *ref)
 {
        struct remote *remote;
@@ -96,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;