git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Ayush Chandekar <ayu.chandekar@gmail.com>
Date
Aug 11, 2025, 18:25 UTC
Message-ID
<CAE7as+YdYmmUvVxzY+CeA2vNU01av_QtvsmcUTy=FibqVRrudA@mail.gmail.com>
In-Reply-To
<xmqqikit3kgo.fsf@gitster.g>
On Mon, Aug 11, 2025 at 9:43 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 20 quoted lines
>
> Phillip Wood <phillip.wood123@gmail.com> 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.
Yes, then we can create a struct and pass the struct instead, maybe.

Thanks, Ayush

Previous: Junio C HamanoNext: Ayush Chandekar
Message 18 of 19 in “builtin/fmt-merge-msg: remove dependency on global variables and 'the_repository'”
  1. 0/2 builtin/fmt-merge-msg: remove dependency on global variables and 'the_repository'Ayush Chandekar, Jul 29, 2025
  2. 1/2 environment: remove the global variable 'merge_log_config'Ayush Chandekar, Jul 29, 2025
  3. Junio C HamanoJul 29, 2025
  4. Ayush ChandekarJul 29, 2025
  5. Junio C HamanoJul 29, 2025
  6. Phillip WoodJul 29, 2025
  7. Ayush ChandekarJul 29, 2025
  8. Phillip WoodJul 30, 2025
  9. 2/2 builtin/fmt-merge-msg: stop depending on 'the_repository'Ayush Chandekar, Jul 29, 2025
  10. Junio C HamanoJul 29, 2025
  11. Ayush ChandekarJul 29, 2025
  12. Junio C HamanoJul 29, 2025
  13. Ayush ChandekarAug 10, 2025
  14. 0/2 builtin/fmt-merge-msg: remove dependency on global variables and 'the_repository'Ayush Chandekar, Aug 10, 2025
  15. 1/2 environment: remove the global variable 'merge_log_config'Ayush Chandekar, Aug 10, 2025
  16. Phillip WoodAug 11, 2025
  17. Junio C HamanoAug 11, 2025
  18. Ayush ChandekarAug 11, 2025
  19. 2/2 builtin/fmt-merge-msg: stop depending on 'the_repository'Ayush Chandekar, Aug 10, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.