diff options
author | Patrick Steinhardt <ps@pks.im> | 2024-09-12 13:29:24 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-09-12 19:15:39 +0200 |
commit | 246deeac9517d6daba89bfcf6de6d290e39af585 (patch) | |
tree | d604806493140d8f3f9e26f705c749b4a0535311 /transport-helper.c | |
parent | The tenth batch (diff) | |
download | git-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.c | 2 |
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>" */ |