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

Re: [GSOC PATCH 2/2] builtin/fmt-merge-msg: stop depending on 'the_repository'

From
Ayush Chandekar <ayu.chandekar@gmail.com>
Date
Jul 29, 2025, 21:49 UTC
Message-ID
<CAE7as+ZUcqRbnOC11DQ7=b+YB+9HTfjfqCvxzmz+mpSH6DxkGQ@mail.gmail.com>
In-Reply-To
<xmqqjz3rospl.fsf@gitster.g>
On Tue, Jul 29, 2025 at 10:11 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 22 quoted lines
>
> Ayush Chandekar <ayu.chandekar@gmail.com> writes:
>
> > Refactor builtin/fmt-merge-msg.c to remove the dependancy on the global
> > 'the_repository'. Replace all the occurrences of 'the_repository' with
> > 'repo', where 'repo' is a pointer to 'struct repository' passed to the
> > function 'cmd_fmt_merge_msg()' and thus remove the definition '#define
> > USE_THE_REPOSITORY_VARIABLE'. Also, add a test to make sure that "git
> > fmt-merge-msg -h" can be called outside a repository.
>
> This also moves the call to git_config()/repo_config() after
> parse_options().
>
> It generally is a bad idea to read command line options first and
> then read the configuration (it is a bug if such a flow causes
> values from configuration to overwrite values from command line).
> THe current set of options and configuration variables may not
> overlap, in which case such a questionable arrangement happen to be
> without bug right now, but it would prevent future developers from
> adding new options and configuration variables and make them
> interact with each other in the most natural way.
>
I understand it, but how do we tackle if NULL repository is passed.
> In any case, the reason for this change of the order between config
> and parse-options is not explained at all in the proposed log
> message.
>
 Apologies, I will mention it.
Previous: Junio C HamanoNext: Junio C Hamano
Message 11 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.