diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-03-26 16:26:10 +0900 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-03-26 16:26:10 +0900 |
| commit | 1a764cdbdcaba4e9b1d4d5d00b51716977178392 (patch) | |
| tree | 75da1465ac2b5bd36587366fc175e9084f701bec /config.c | |
| parent | def5e32bc56617c8f43ddc17ee5785abf1b865d4 (diff) | |
| parent | 09cbf1597edde2b0200ecbf469c78689c4dcb12f (diff) | |
| download | git-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.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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); } |
