aboutsummaryrefslogtreecommitdiffstats
path: root/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'config.c')
-rw-r--r--config.c33
1 files changed, 14 insertions, 19 deletions
diff --git a/config.c b/config.c
index 50f2d17b39..b18b5617fc 100644
--- a/config.c
+++ b/config.c
@@ -19,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"
@@ -30,7 +31,7 @@
#include "hashmap.h"
#include "string-list.h"
#include "object-name.h"
-#include "object-store-ll.h"
+#include "object-store.h"
#include "pager.h"
#include "path.h"
#include "utf8.h"
@@ -1436,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;
@@ -1494,11 +1490,6 @@ static int git_default_core_config(const char *var, const char *value,
return 0;
}
- if (!strcmp(var, "core.bigfilethreshold")) {
- big_file_threshold = git_config_ulong(var, value, ctx->kvi);
- return 0;
- }
-
if (!strcmp(var, "core.autocrlf")) {
if (value && !strcasecmp(value, "input")) {
auto_crlf = AUTO_CRLF_INPUT;
@@ -1651,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);
}
@@ -1662,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;
}
@@ -1678,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;
}
@@ -1714,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;
}
@@ -1743,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;
}
@@ -1759,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;
}
@@ -1772,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;
}
@@ -1830,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;
}
@@ -2525,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);
}