aboutsummaryrefslogtreecommitdiff
path: root/builtin/fetch.c
diff options
context:
space:
mode:
authorBurak Kaan Karaçay <bkkaracay@gmail.com>2026-03-12 17:44:37 +0300
committerJunio C Hamano <gitster@pobox.com>2026-03-12 08:30:57 -0700
commit9df3be8e2e7e2c9bf200de4bcfbd4e690a57f033 (patch)
treeb6090a41f63ed0e80ab4a202fa9e106a237337df /builtin/fetch.c
parent05c324b92fe723674cbf9ae1b0b1675821b6c275 (diff)
downloadgit-9df3be8e2e7e2c9bf200de4bcfbd4e690a57f033.tar.xz
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>
Diffstat (limited to 'builtin/fetch.c')
-rw-r--r--builtin/fetch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/fetch.c b/builtin/fetch.c
index 8a36cf67b5..4795b2a13c 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -2873,7 +2873,7 @@ int cmd_fetch(int argc,
if (opt_val != 0)
git_config_push_parameter("maintenance.incremental-repack.auto=-1");
}
- run_auto_maintenance(verbosity < 0);
+ run_auto_maintenance(the_repository, verbosity < 0);
}
cleanup: