promisor-remote: parse remote.*.partialclonefilter
[git/git.git] / promisor-remote.c
index 6a8856f..826890f 100644 (file)
@@ -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;
 }