aboutsummaryrefslogtreecommitdiffstats
path: root/config.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-03-26 16:26:10 +0900
committerJunio C Hamano <gitster@pobox.com>2025-03-26 16:26:10 +0900
commit1a764cdbdcaba4e9b1d4d5d00b51716977178392 (patch)
tree75da1465ac2b5bd36587366fc175e9084f701bec /config.c
parentdef5e32bc56617c8f43ddc17ee5785abf1b865d4 (diff)
parent09cbf1597edde2b0200ecbf469c78689c4dcb12f (diff)
downloadgit-1a764cdbdcaba4e9b1d4d5d00b51716977178392.tar.gz
Merge branch 'ua/some-builtins-wo-the-repository'
A handful of built-in command implementations have been rewritten to use the repository instance supplied by git.c:run_builtin(), its caller. * ua/some-builtins-wo-the-repository: builtin/checkout-index: stop using `the_repository` builtin/for-each-ref: stop using `the_repository` builtin/ls-files: stop using `the_repository` builtin/pack-refs: stop using `the_repository` builtin/send-pack: stop using `the_repository` builtin/verify-commit: stop using `the_repository` builtin/verify-tag: stop using `the_repository` config: teach repo_config to allow `repo` to be NULL
Diffstat (limited to 'config.c')
-rw-r--r--config.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/config.c b/config.c
index 658569af08..e127afaa8f 100644
--- a/config.c
+++ b/config.c
@@ -2521,6 +2521,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);
}