Skip to content

Commit 7b6e1b0

Browse files
chriscoolgitster
authored andcommitted
Move core_partial_clone_filter_default to promisor-remote.c
Now that we can have a different default partial clone filter for each promisor remote, let's hide core_partial_clone_filter_default as a static in promisor-remote.c to avoid it being use for anything other than managing backward compatibility. Signed-off-by: Christian Couder <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 56fe0cf commit 7b6e1b0

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

cache.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -958,7 +958,6 @@ extern int grafts_replace_parents;
958958
#define GIT_REPO_VERSION 0
959959
#define GIT_REPO_VERSION_READ 1
960960
extern int repository_format_precious_objects;
961-
extern const char *core_partial_clone_filter_default;
962961
extern int repository_format_worktree_config;
963962

964963
/*

config.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1344,11 +1344,6 @@ static int git_default_core_config(const char *var, const char *value, void *cb)
13441344
return 0;
13451345
}
13461346

1347-
if (!strcmp(var, "core.partialclonefilter")) {
1348-
return git_config_string(&core_partial_clone_filter_default,
1349-
var, value);
1350-
}
1351-
13521347
if (!strcmp(var, "core.usereplacerefs")) {
13531348
read_replace_refs = git_config_bool(var, value);
13541349
return 0;

environment.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ int warn_ambiguous_refs = 1;
3131
int warn_on_object_refname_ambiguity = 1;
3232
int ref_paranoia = -1;
3333
int repository_format_precious_objects;
34-
const char *core_partial_clone_filter_default;
3534
int repository_format_worktree_config;
3635
const char *git_commit_encoding;
3736
const char *git_log_output_encoding;

promisor-remote.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include "transport.h"
66

77
static char *repository_format_partial_clone;
8+
static const char *core_partial_clone_filter_default;
89

910
void set_repository_format_partial_clone(char *partial_clone)
1011
{
@@ -103,6 +104,10 @@ static int promisor_remote_config(const char *var, const char *value, void *data
103104
int namelen;
104105
const char *subkey;
105106

107+
if (!strcmp(var, "core.partialclonefilter"))
108+
return git_config_string(&core_partial_clone_filter_default,
109+
var, value);
110+
106111
if (parse_config_key(var, "remote", &name, &namelen, &subkey) < 0)
107112
return 0;
108113

0 commit comments

Comments
 (0)