]> git.ipfire.org Git - thirdparty/git.git/commitdiff
git.c: remove the_repository dependence in run_builtin()
authorLidong Yan <yldhome2d2@gmail.com>
Mon, 16 Jun 2025 06:22:33 +0000 (14:22 +0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 16 Jun 2025 15:17:12 +0000 (08:17 -0700)
run_builtin() takes a repo parameter, so the use of the_repository
is no longer necessary. Removed the usage of the_repository.

Signed-off-by: Lidong Yan <502024330056@smail.nju.edu.cn>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git.c

diff --git a/git.c b/git.c
index 77c435952232f60435bfd96697e304ee1761f565..8525ede550d520e8788c800e75e8440c6a411300 100644 (file)
--- a/git.c
+++ b/git.c
@@ -462,12 +462,12 @@ static int run_builtin(struct cmd_struct *p, int argc, const char **argv, struct
        precompose_argv_prefix(argc, argv, NULL);
        if (use_pager == -1 && run_setup &&
                !(p->option & DELAY_PAGER_CONFIG))
-               use_pager = check_pager_config(the_repository, p->cmd);
+               use_pager = check_pager_config(repo, p->cmd);
        if (use_pager == -1 && p->option & USE_PAGER)
                use_pager = 1;
        if (run_setup && startup_info->have_repository)
                /* get_git_dir() may set up repo, avoid that */
-               trace_repo_setup(the_repository);
+               trace_repo_setup(repo);
        commit_pager_choice();
 
        if (!help && p->option & NEED_WORK_TREE)