summaryrefslogtreecommitdiffstats
path: root/transport-helper.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-09-12 13:29:24 +0200
committerJunio C Hamano <gitster@pobox.com>2024-09-12 19:15:39 +0200
commit246deeac9517d6daba89bfcf6de6d290e39af585 (patch)
treed604806493140d8f3f9e26f705c749b4a0535311 /transport-helper.c
parentThe tenth batch (diff)
downloadgit-246deeac9517d6daba89bfcf6de6d290e39af585.tar.xz
git-246deeac9517d6daba89bfcf6de6d290e39af585.zip
environment: make `get_git_dir()` accept a repository
The `get_git_dir()` function retrieves the path to the Git directory for `the_repository`. Make it accept a `struct repository` such that it can work on arbitrary repositories and make it part of the repository subsystem. This reduces our reliance on `the_repository` and clarifies scope. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'transport-helper.c')
-rw-r--r--transport-helper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/transport-helper.c b/transport-helper.c
index 09b3560ffd..abe16eea65 100644
--- a/transport-helper.c
+++ b/transport-helper.c
@@ -143,7 +143,7 @@ static struct child_process *get_helper(struct transport *transport)
if (have_git_dir())
strvec_pushf(&helper->env, "%s=%s",
- GIT_DIR_ENVIRONMENT, get_git_dir());
+ GIT_DIR_ENVIRONMENT, repo_get_git_dir(the_repository));
helper->trace2_child_class = helper->args.v[0]; /* "remote-<name>" */