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

From: Burak Kaan Karaçay <[email-masked]>
Date: Thu, 12 Mar 2026 17:44:35 +0300

Hi,

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.

Changes in v2:
- Dropped the wrapper approach and rewrote the patch around the approach
  suggested by René.

Thanks for all guidance,
Burak Kaan Karaçay

Burak Kaan Karaçay (2):
  run-command: wean start_command() off the_repository
  run-command: wean auto_maintenance() functions off the_repository

 builtin/am.c           |  2 +-
 builtin/commit.c       |  2 +-
 builtin/fetch.c        |  2 +-
 builtin/gc.c           | 14 +++++++++-----
 builtin/merge.c        |  2 +-
 builtin/pull.c         |  2 +-
 builtin/rebase.c       |  4 +++-
 builtin/receive-pack.c |  2 +-
 run-command.c          | 20 ++++++++++----------
 run-command.h          |  9 ++++++---
 10 files changed, 34 insertions(+), 25 deletions(-)

-- 
2.53.0