Subject: Re: [GSOC PATCH v2 1/2] environment: remove the global variable 'merge_log_config'

From: Junio C Hamano <[email-masked]>
Date: Mon, 11 Aug 2025 09:13:27 -0700

Phillip Wood <[email-masked]> writes:

> Hi Ayush
>
> On 11/08/2025 00:45, Ayush Chandekar wrote:
>> The global variable 'merge_log_config', set via the "merge.log" or
>> "merge.summary" settings, is only used in 'cmd_fmt_merge_msg()' and
>> 'cmd_merge()' to adjust the 'shortlog_len' variable.
>> Remove 'merge_log_config' globally and localize it in
>> 'cmd_fmt_merge_msg()' and 'cmd_merge()'. Set its value by passing it in
>> 'fmt_merge_msg_config()' by passing its pointer to the function via the
>> callback parameter.
>
> This looks like a good solution

When fmt_merge_msg_config() needs to read more stuff, the callback
parameter may have to be updated, but this will do for now.

Thanks.