public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Burak Kaan Karaçay" <bkkaracay@gmail.com>
Cc: git@vger.kernel.org,  christian.couder@gmail.com,
	karthik.188@gmail.com,  jltobler@gmail.com,
	 ayu.chandekar@gmail.com, siddharthasthana31@gmail.com,
	 l.s.r@web.de,  ps@pks.im,  peff@peff.net
Subject: Re: [PATCH v3 0/2] run-command: stop using the_repository
Date: Thu, 12 Mar 2026 08:29:52 -0700	[thread overview]
Message-ID: <xmqqa4wdhxqn.fsf@gitster.g> (raw)
In-Reply-To: <20260312144437.626392-1-bkkaracay@gmail.com> ("Burak Kaan Karaçay"'s message of "Thu, 12 Mar 2026 17:44:35 +0300")

Burak Kaan Karaçay <bkkaracay@gmail.com> writes:

> 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;
 

  parent reply	other threads:[~2026-03-12 15:29 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-11 15:19 [PATCH 0/4] wean start_command() off the_repository Burak Kaan Karaçay
2026-03-11 15:19 ` [PATCH 1/4] run-command: add repo_start_command() Burak Kaan Karaçay
2026-03-11 15:19 ` [PATCH 2/4] run-command: use repo_start_command() in strict callers Burak Kaan Karaçay
2026-03-11 19:26   ` Junio C Hamano
2026-03-11 15:19 ` [PATCH 3/4] run-command: redefine start_command() as a wrapper macro Burak Kaan Karaçay
2026-03-11 15:19 ` [PATCH 4/4] cocci: convert start_command() to repo_start_command() Burak Kaan Karaçay
2026-03-11 18:18 ` [PATCH 0/4] wean start_command() off the_repository René Scharfe
2026-03-11 18:45   ` Jeff King
2026-03-11 19:09   ` Burak Kaan Karaçay
2026-03-11 19:35   ` Junio C Hamano
2026-03-11 19:30 ` Junio C Hamano
2026-03-12  8:53 ` [PATCH v2] run-command: " Burak Kaan Karaçay
2026-03-12 10:01   ` Patrick Steinhardt
2026-03-12 14:44 ` [PATCH v3 0/2] run-command: stop using the_repository Burak Kaan Karaçay
2026-03-12 14:44   ` [PATCH v3 1/2] run-command: wean start_command() off the_repository Burak Kaan Karaçay
2026-03-12 14:44   ` [PATCH v3 2/2] run-command: wean auto_maintenance() functions " Burak Kaan Karaçay
2026-03-12 15:29   ` Junio C Hamano [this message]
2026-03-13  6:23     ` [PATCH v3 0/2] run-command: stop using the_repository Patrick Steinhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqa4wdhxqn.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=ayu.chandekar@gmail.com \
    --cc=bkkaracay@gmail.com \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jltobler@gmail.com \
    --cc=karthik.188@gmail.com \
    --cc=l.s.r@web.de \
    --cc=peff@peff.net \
    --cc=ps@pks.im \
    --cc=siddharthasthana31@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox