]> git.ipfire.org Git - thirdparty/git.git/commit - fsck.c
config: pass ctx with config files
authorGlen Choo <chooglen@google.com>
Wed, 28 Jun 2023 19:26:24 +0000 (19:26 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 28 Jun 2023 21:06:39 +0000 (14:06 -0700)
commit809d868061c5e55e9b3bd59a4118628318eb46e9
tree3f87f874677594a0fd3393b76f88875f058682d7
parent6021e1d1580169532512772afbb86996f717f4ae
config: pass ctx with config files

Pass config_context to config_callbacks when parsing config files. To
provide the .kvi member, refactor out the configset logic that caches
"struct config_source" and "enum config_scope" as a "struct
key_value_info". Make the "enum config_scope" available to the config
file machinery by plumbing an additional arg through
git_config_from_file_with_options().

We do not exercise ctx yet because the remaining current_config_*()
callers may be used with config_with_options(), which may read config
from parameters, but parameters don't pass ctx yet.

Signed-off-by: Glen Choo <chooglen@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
bundle-uri.c
config.c
config.h
fsck.c
submodule-config.c