promisor-remote: parse remote.*.partialclonefilter
[gitweb.git] / promisor-remote.c
index 6a8856f475502d806456d3cf8186495f0e58f733..826890f7b805f8ed73c13a66f65ff9140651514f 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;
 }