@matheusbsbs / matheus-bagliano / commits / 625e7f148e
Fork 0

promisor-remote: remove unused variable

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>

Jonathan Tan committed Sep 21, 2020 at 20:03 UTC 625e7f148e46c7e09f817ce6ab25f14d4e753f1e
2 files changed +1 -6
promisor-remote.c
-5
@@ -6,7 +6,6 @@
6 #include "strvec.h"
7
8 static char *repository_format_partial_clone;
9 -static const char *core_partial_clone_filter_default;
9
10 void set_repository_format_partial_clone(char *partial_clone)
11 {
@@ -100,10 +99,6 @@ static int promisor_remote_config(const char *var, const char *value, void *data
99 size_t namelen;
100 const char *subkey;
101
103 - if (!strcmp(var, "core.partialclonefilter"))
104 - return git_config_string(&core_partial_clone_filter_default,
105 - var, value);
106 -
102 if (parse_config_key(var, "remote", &name, &namelen, &subkey) < 0)
103 return 0;
104
promisor-remote.h
+1 -1
@@ -9,7 +9,7 @@ struct object_id;
9 * Promisor remote linked list
10 *
11 * Information in its fields come from remote.XXX config entries or
12 - * from extensions.partialclone or core.partialclonefilter.
12 + * from extensions.partialclone.
13 */
14 struct promisor_remote {
15 struct promisor_remote *next;