mirror of
https://github.com/git-for-windows/git.git
synced 2026-04-26 15:03:32 -05:00
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>
This commit is contained in:
committed by
Junio C Hamano
parent
05c324b92f
commit
9df3be8e2e
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user