Subject: Re: [PATCH v3 12/12] config: pass source to config_parser_event_fn_t

From: Junio C Hamano <[email-masked]>
Date: Tue, 20 Jun 2023 14:46:50 -0700

"Glen Choo via GitGitGadget" <[email-masked]> writes:

> From: Glen Choo <[email-masked]>
>
> ..so that the callback can use a "struct config_source" parameter
> instead of "config_reader.source". "struct config_source" is internal to
> config.c, so we are adding a pointer to a struct defined in config.c
> into a public function signature defined in config.h, but this is okay
> because this function has only ever been (and probably ever will be)
> used internally by config.c.
>
> As a result, the_reader isn't used anywhere, so "struct config_reader"
> is obsolete (it was only intended to be used with the_reader). Remove
> them.
>
> Signed-off-by: Glen Choo <[email-masked]>
> ---
>  config.c | 77 ++++++++++----------------------------------------------
>  config.h |  6 +++++
>  2 files changed, 19 insertions(+), 64 deletions(-)

Together with the removal of current_* functions in earlier steps,
getting rid of the_reader interface makes the config API more easily
reused in other contexts, I guess.  Nicely done.