]> git.ipfire.org Git - thirdparty/git.git/commit
environment: make `get_git_common_dir()` accept a repository
authorPatrick Steinhardt <ps@pks.im>
Thu, 12 Sep 2024 11:29:27 +0000 (13:29 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 12 Sep 2024 17:15:39 +0000 (10:15 -0700)
commit661624a4f6299b44f56df162100fdca528c119c1
treeb210fa7d6fc0c5fc1e63bea4b5dac9ebba48e8d7
parent246deeac9517d6daba89bfcf6de6d290e39af585
environment: make `get_git_common_dir()` accept a repository

The `get_git_common_dir()` function retrieves the path to the common
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>
13 files changed:
builtin/config.c
builtin/gc.c
builtin/rev-parse.c
builtin/worktree.c
config.c
environment.c
environment.h
repository.c
repository.h
setup.c
submodule.c
trace.c
worktree.c