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

Re: [PATCH v3 0/2] run-command: stop using the_repository

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 12, 2026, 15:29 UTC
Message-ID
<xmqqa4wdhxqn.fsf@gitster.g>
In-Reply-To
<20260312144437.626392-1-bkkaracay@gmail.com>
Burak Kaan Karaçay <bkkaracay@gmail.com> writes:
Show 15 quoted lines
> This patch series aims to remove the_repository dependency in
> 'run-command.c'.
>
> The first patch removes the dependency in start_command() by replacing
> the boolean 'close_object_store' flag with a pointer to the target
> object store.
>
> The second patch handles the prepare_auto_maintenance() and
> run_auto_maintenance() functions by passing a 'struct repository *'
> parameter. With no global repository dependencies left, it drops the
> USE_THE_REPOSITORY_VARIABLE macro from the file.
>
> Changes in v3:
> - Added the second patch at the suggestion of Patrick to fully clean up
>   the file.

[1/2] is now exactly as expected from the previous discussion. The only miniscule thing I found in [2/2] was a new blank line introduced here, which seemed unnecessary and not in line with the existing style in that function.

Otherwise, looking very good.  Will queue.  Thanks.
diff --git a/builtin/rebase.c b/builtin/rebase.c
index c487e10907..8c1316db38 100644
--- a/builtin/rebase.c
+++ b/builtin/rebase.c
@@ -562,7 +562,9 @@ static int finish_rebase(struct rebase_options *opts)
 	 * We ignore errors in 'git maintenance run --auto', since the
 	 * user should see them.
 	 */
-	run_auto_maintenance(!(opts->flags & (REBASE_NO_QUIET|REBASE_VERBOSE)));
+	run_auto_maintenance(the_repository,
+			!(opts->flags & (REBASE_NO_QUIET|REBASE_VERBOSE)));
+
 	if (opts->type == REBASE_MERGE) {
 		struct replay_opts replay = REPLAY_OPTS_INIT;
 
Previous: Burak Kaan KaraçayNext: Patrick Steinhardt
Message 17 of 18 in “wean start_command() off the_repository”
  1. 0/4 wean start_command() off the_repositoryBurak Kaan Karaçay, Mar 11, 2026
  2. 1/4 run-command: add repo_start_command()Burak Kaan Karaçay, Mar 11, 2026
  3. 2/4 run-command: use repo_start_command() in strict callersBurak Kaan Karaçay, Mar 11, 2026
  4. Junio C HamanoMar 11, 2026
  5. 3/4 run-command: redefine start_command() as a wrapper macroBurak Kaan Karaçay, Mar 11, 2026
  6. 4/4 cocci: convert start_command() to repo_start_command()Burak Kaan Karaçay, Mar 11, 2026
  7. René ScharfeMar 11, 2026
  8. Jeff KingMar 11, 2026
  9. Burak Kaan KaraçayMar 11, 2026
  10. Junio C HamanoMar 11, 2026
  11. Junio C HamanoMar 11, 2026
  12. run-command: wean start_command() off the_repositoryBurak Kaan Karaçay, Mar 12, 2026
  13. Patrick SteinhardtMar 12, 2026
  14. 0/2 run-command: stop using the_repositoryBurak Kaan Karaçay, Mar 12, 2026
  15. 1/2 run-command: wean start_command() off the_repositoryBurak Kaan Karaçay, Mar 12, 2026
  16. 2/2 run-command: wean auto_maintenance() functions off the_repositoryBurak Kaan Karaçay, Mar 12, 2026
  17. Junio C HamanoMar 12, 2026
  18. Patrick SteinhardtMar 13, 2026

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.