diff options
Diffstat (limited to 'config.c')
| -rw-r--r-- | config.c | 54 |
1 files changed, 14 insertions, 40 deletions
@@ -7,6 +7,7 @@ */ #define USE_THE_REPOSITORY_VARIABLE +#define DISABLE_SIGN_COMPARE_WARNINGS #include "git-compat-util.h" #include "abspath.h" @@ -18,6 +19,7 @@ #include "convert.h" #include "environment.h" #include "gettext.h" +#include "git-zlib.h" #include "ident.h" #include "repository.h" #include "lockfile.h" @@ -1435,11 +1437,6 @@ static int git_default_core_config(const char *var, const char *value, return git_config_pathname(&git_attributes_file, var, value); } - if (!strcmp(var, "core.hookspath")) { - FREE_AND_NULL(git_hooks_path); - return git_config_pathname(&git_hooks_path, var, value); - } - if (!strcmp(var, "core.bare")) { is_bare_repository_cfg = git_config_bool(var, value); return 0; @@ -1493,33 +1490,6 @@ static int git_default_core_config(const char *var, const char *value, return 0; } - if (!strcmp(var, "core.packedgitwindowsize")) { - int pgsz_x2 = getpagesize() * 2; - packed_git_window_size = git_config_ulong(var, value, ctx->kvi); - - /* This value must be multiple of (pagesize * 2) */ - packed_git_window_size /= pgsz_x2; - if (packed_git_window_size < 1) - packed_git_window_size = 1; - packed_git_window_size *= pgsz_x2; - return 0; - } - - if (!strcmp(var, "core.bigfilethreshold")) { - big_file_threshold = git_config_ulong(var, value, ctx->kvi); - return 0; - } - - if (!strcmp(var, "core.packedgitlimit")) { - packed_git_limit = git_config_ulong(var, value, ctx->kvi); - return 0; - } - - if (!strcmp(var, "core.deltabasecachelimit")) { - delta_base_cache_limit = git_config_ulong(var, value, ctx->kvi); - return 0; - } - if (!strcmp(var, "core.autocrlf")) { if (value && !strcasecmp(value, "input")) { auto_crlf = AUTO_CRLF_INPUT; @@ -1672,7 +1642,7 @@ static int git_default_core_config(const char *var, const char *value, return 0; } - /* Add other config variables here and to Documentation/config.txt. */ + /* Add other config variables here and to Documentation/config.adoc. */ return platform_core_config(var, value, ctx, cb); } @@ -1683,7 +1653,7 @@ static int git_default_sparse_config(const char *var, const char *value) return 0; } - /* Add other config variables here and to Documentation/config/sparse.txt. */ + /* Add other config variables here and to Documentation/config/sparse.adoc. */ return 0; } @@ -1699,7 +1669,7 @@ static int git_default_i18n_config(const char *var, const char *value) return git_config_string(&git_log_output_encoding, var, value); } - /* Add other config variables here and to Documentation/config.txt. */ + /* Add other config variables here and to Documentation/config.adoc. */ return 0; } @@ -1735,7 +1705,7 @@ static int git_default_branch_config(const char *var, const char *value) return 0; } - /* Add other config variables here and to Documentation/config.txt. */ + /* Add other config variables here and to Documentation/config.adoc. */ return 0; } @@ -1764,7 +1734,7 @@ static int git_default_push_config(const char *var, const char *value) return 0; } - /* Add other config variables here and to Documentation/config.txt. */ + /* Add other config variables here and to Documentation/config.adoc. */ return 0; } @@ -1780,7 +1750,7 @@ static int git_default_mailmap_config(const char *var, const char *value) return git_config_string(&git_mailmap_blob, var, value); } - /* Add other config variables here and to Documentation/config.txt. */ + /* Add other config variables here and to Documentation/config.adoc. */ return 0; } @@ -1793,7 +1763,7 @@ static int git_default_attr_config(const char *var, const char *value) /* * Add other attribute related config variables here and to - * Documentation/config/attr.txt. + * Documentation/config/attr.adoc. */ return 0; } @@ -1851,7 +1821,7 @@ int git_default_config(const char *var, const char *value, if (starts_with(var, "sparse.")) return git_default_sparse_config(var, value); - /* Add other config variables here and to Documentation/config.txt. */ + /* Add other config variables here and to Documentation/config.adoc. */ return 0; } @@ -2546,6 +2516,10 @@ void repo_config_clear(struct repository *repo) void repo_config(struct repository *repo, config_fn_t fn, void *data) { + if (!repo) { + read_very_early_config(fn, data); + return; + } git_config_check_init(repo); configset_iter(repo->config, fn, data); } |
