Re: [RFC PATCH 5/5] config API: add and use a repo_config_kvi()
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 17, 2023, 17:17 UTC
- Message-ID
- <xmqqlejvguwj.fsf@gitster.g>
- In-Reply-To
- <RFC-patch-5.5-2b80d293c83-20230317T042408Z-avarab@gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 8 quoted lines
> Introduce a repo_config_kvi(), which is a repo_config() which calls a > "config_kvi_fn_t", rather than the "config_fn_t" that repo_config() > uses. > > This allows us to pass along the "struct key_value_info *" directly, > rather than having the callback grab it from the global > "current_config_kvi" that we've been maintaining in > "configset_iter()".
Nice that you can plumb kvi through the callchain but without having to touch the end-user-visible callback data *cb or the function signature of the cllaback functions.
> This leaves the other current_config_*() functions. Subsequent commits > will need to deal with those.