]> git.ipfire.org Git - thirdparty/git.git/commitdiff
promisor-remote: remove unused variable
authorJonathan Tan <jonathantanmy@google.com>
Tue, 22 Sep 2020 03:03:56 +0000 (20:03 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 22 Sep 2020 05:32:49 +0000 (22:32 -0700)
The variable core_partial_clone_filter_default has been unused since
fa3d1b63e8 ("promisor-remote: parse remote.*.partialclonefilter",
2019-06-25), when Git was changed to refer to
remote.*.partialclonefilter as the default filter when fetching in a
partial clone, but (perhaps inadvertently) there was no fallback to
core.partialclonefilter.

One alternative is to add the fallback, but the aforementioned change
was made more than a year ago and I have not heard of any complaints
regarding this matter. In addition, there is currently no mention of
core.partialclonefilter in the user documentation. So it seems best to
reaffirm that Git will only support remote.*.partialclonefilter.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
promisor-remote.c
promisor-remote.h

index 6530e26f98cc4df511527a10fda2d605ac5b1e20..3c572b1c811e0b8912a11e3f193eb79f131ee763 100644 (file)
@@ -6,7 +6,6 @@
 #include "strvec.h"
 
 static char *repository_format_partial_clone;
-static const char *core_partial_clone_filter_default;
 
 void set_repository_format_partial_clone(char *partial_clone)
 {
@@ -100,10 +99,6 @@ static int promisor_remote_config(const char *var, const char *value, void *data
        size_t 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;
 
index 6343c47d1830f947aae456ed48e305faef26b6c0..c7a14063c51e0ba66afb01a9e8b59cc9d7e12655 100644 (file)
@@ -9,7 +9,7 @@ struct object_id;
  * Promisor remote linked list
  *
  * Information in its fields come from remote.XXX config entries or
- * from extensions.partialclone or core.partialclonefilter.
+ * from extensions.partialclone.
  */
 struct promisor_remote {
        struct promisor_remote *next;