]> git.ipfire.org Git - thirdparty/git.git/commit
environment: make `get_git_dir()` accept a repository
authorPatrick Steinhardt <ps@pks.im>
Thu, 12 Sep 2024 11:29:24 +0000 (13:29 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 12 Sep 2024 17:15:39 +0000 (10:15 -0700)
commit246deeac9517d6daba89bfcf6de6d290e39af585
treed604806493140d8f3f9e26f705c749b4a0535311
parent17d4b10aea6bda2027047a0e3548a6f8ad667dde
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>
21 files changed:
apply.c
builtin/am.c
builtin/commit.c
builtin/config.c
builtin/difftool.c
builtin/fsmonitor--daemon.c
builtin/merge.c
builtin/stash.c
cache-tree.c
config.c
environment.c
environment.h
pathspec.c
read-cache.c
repository.c
repository.h
setup.c
setup.h
trace.c
transport-helper.c
worktree.c