From: Glen Choo Date: Tue, 20 Jun 2023 23:06:52 GMT Subject: Re: [PATCH v3 06/12] builtin/config.c: test misuse of format_config() Message-ID: In-Reply-To: Junio C Hamano writes: >> current_config_*() functions aren't meant to be called outside of >> config callbacks because they read state that is only set when iterating >> through config. > > Interesting. And config_context is about expressing the state of > the iteration, so presumably some of these callers that do not have > config_context to pass (because they happen outside iterations) will > now (can|have to) pass NULL or something to say "I am asking format > but from outside any iteration" or something? Yup, they now have to pass a default value for config_context. For .kvi, it should be what's given by KVI_INIT (the next patch has an example).