зеркало из https://github.com/microsoft/git.git
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 <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
60b7a92d84
Коммит
4ca9474efa
1
cache.h
1
cache.h
|
@ -961,7 +961,6 @@ extern int grafts_replace_parents;
|
||||||
#define GIT_REPO_VERSION 0
|
#define GIT_REPO_VERSION 0
|
||||||
#define GIT_REPO_VERSION_READ 1
|
#define GIT_REPO_VERSION_READ 1
|
||||||
extern int repository_format_precious_objects;
|
extern int repository_format_precious_objects;
|
||||||
extern const char *core_partial_clone_filter_default;
|
|
||||||
extern int repository_format_worktree_config;
|
extern int repository_format_worktree_config;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
5
config.c
5
config.c
|
@ -1344,11 +1344,6 @@ static int git_default_core_config(const char *var, const char *value, void *cb)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!strcmp(var, "core.partialclonefilter")) {
|
|
||||||
return git_config_string(&core_partial_clone_filter_default,
|
|
||||||
var, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!strcmp(var, "core.usereplacerefs")) {
|
if (!strcmp(var, "core.usereplacerefs")) {
|
||||||
read_replace_refs = git_config_bool(var, value);
|
read_replace_refs = git_config_bool(var, value);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -31,7 +31,6 @@ int warn_ambiguous_refs = 1;
|
||||||
int warn_on_object_refname_ambiguity = 1;
|
int warn_on_object_refname_ambiguity = 1;
|
||||||
int ref_paranoia = -1;
|
int ref_paranoia = -1;
|
||||||
int repository_format_precious_objects;
|
int repository_format_precious_objects;
|
||||||
const char *core_partial_clone_filter_default;
|
|
||||||
int repository_format_worktree_config;
|
int repository_format_worktree_config;
|
||||||
const char *git_commit_encoding;
|
const char *git_commit_encoding;
|
||||||
const char *git_log_output_encoding;
|
const char *git_log_output_encoding;
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#include "transport.h"
|
#include "transport.h"
|
||||||
|
|
||||||
static char *repository_format_partial_clone;
|
static char *repository_format_partial_clone;
|
||||||
|
static const char *core_partial_clone_filter_default;
|
||||||
|
|
||||||
void set_repository_format_partial_clone(char *partial_clone)
|
void set_repository_format_partial_clone(char *partial_clone)
|
||||||
{
|
{
|
||||||
|
@ -103,6 +104,10 @@ static int promisor_remote_config(const char *var, const char *value, void *data
|
||||||
int namelen;
|
int namelen;
|
||||||
const char *subkey;
|
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)
|
if (parse_config_key(var, "remote", &name, &namelen, &subkey) < 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче