Re: [PATCH v3 06/12] builtin/config.c: test misuse of format_config()
- From
Glen Choo <chooglen@google.com>
- Date
- Jun 20, 2023, 23:06 UTC
- Message-ID
- <kl6l1qi5spgz.fsf@chooglen-macbookpro.roam.corp.google.com>
- In-Reply-To
- <xmqq4jn1lsuv.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 9 quoted lines
>> 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).