Re: [GSOC PATCH v2 1/2] environment: remove the global variable 'merge_log_config'
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 11, 2025, 16:13 UTC
- Message-ID
- <xmqqikit3kgo.fsf@gitster.g>
- In-Reply-To
- <076c19ae-58fc-4823-9679-1d5fe6e46211@gmail.com>
Phillip Wood <phillip.wood123@gmail.com> writes:
Show 12 quoted lines
> 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.