Subject: Re: [PATCH 09/10] trailer: move arg handling to interpret-trailers.c

From: Linus Arver <[email-masked]>
Date: Sat, 20 Jan 2024 12:14:59 -0800

Junio C Hamano <[email-masked]> writes:

> "Linus Arver via GitGitGadget" <[email-masked]> writes:
>
>> 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?

Yes, and I've implemented a "trailer_subsystem_conf" struct to hold all
configuration-related bits (and hardcoded defaults) relating to trailers
in one place, in the larger series.

> 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.

Makes sense. Thanks.