Re: [PATCH 09/10] trailer: move arg handling to interpret-trailers.c
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 19, 2024, 01:14 UTC
- Message-ID
- <xmqqo7dim8dz.fsf@gitster.g>
- In-Reply-To
- <8a99d0fca21eca41d62dcd682c8b4ae545633bf7.1704869487.git.gitgitgadget@gmail.com>
"Linus Arver via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 12 quoted lines
> diff --git a/trailer.c b/trailer.c
> index e2d541372a3..0a86e0d5afa 100644
> --- a/trailer.c
> +++ b/trailer.c
> @@ -66,6 +66,11 @@ static LIST_HEAD(conf_head);
>
> static char *separators = ":";
>
> +const char *default_separators(void)
> +{
> + return separators;
> +}This allows API users to peek into the current set of separator bytes (either the default ":" or specified by the configuration varaible "trailer.separators"), which is an improvement over directly exposing the "separators" variable, but in a longer term, do we need to have some "trailer context" object that holds this and possibly other global variables like this?
I do not demand such further abstraction in this series, but I'd prefer to see if we all have shared vision into the future.
Thanks.