]> git.ipfire.org Git - thirdparty/git.git/commit
run-command: wean auto_maintenance() functions off the_repository
authorBurak Kaan Karaçay <bkkaracay@gmail.com>
Thu, 12 Mar 2026 14:44:37 +0000 (17:44 +0300)
committerJunio C Hamano <gitster@pobox.com>
Thu, 12 Mar 2026 15:30:57 +0000 (08:30 -0700)
commit9df3be8e2e7e2c9bf200de4bcfbd4e690a57f033
treeb6090a41f63ed0e80ab4a202fa9e106a237337df
parent05c324b92fe723674cbf9ae1b0b1675821b6c275
run-command: wean auto_maintenance() functions off the_repository

The prepare_auto_maintenance() relies on the_repository to read
configurations. Since run_auto_maintenance() calls
prepare_auto_maintenance(), it also implicitly depends the_repository.

Add 'struct repository *' as a parameter to both functions and update
all callers to pass the_repository.

With no global repository dependencies left in this file, remove the
USE_THE_REPOSITORY_VARIABLE macro.

Suggested-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Burak Kaan Karaçay <bkkaracay@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/am.c
builtin/commit.c
builtin/fetch.c
builtin/merge.c
builtin/rebase.c
builtin/receive-pack.c
run-command.c
run-command.h