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 10:15:39 -0700 |
| commit | 246deeac9517d6daba89bfcf6de6d290e39af585 (patch) | |
| tree | d604806493140d8f3f9e26f705c749b4a0535311 /builtin/config.c | |
| parent | 17d4b10aea6bda2027047a0e3548a6f8ad667dde (diff) | |
| download | git-246deeac9517d6daba89bfcf6de6d290e39af585.tar.xz | |
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 'builtin/config.c')
| -rw-r--r-- | builtin/config.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/config.c b/builtin/config.c index e00d983596..c10697a2ef 100644 --- a/builtin/config.c +++ b/builtin/config.c @@ -808,7 +808,7 @@ static void location_options_init(struct config_location_options *opts, opts->options.respect_includes = opts->respect_includes_opt; if (startup_info->have_repository) { opts->options.commondir = get_git_common_dir(); - opts->options.git_dir = get_git_dir(); + opts->options.git_dir = repo_get_git_dir(the_repository); } } |
