]> git.ipfire.org Git - thirdparty/git.git/commit
path: stop relying on `the_repository` in `worktree_git_path()`
authorPatrick Steinhardt <ps@pks.im>
Tue, 13 Aug 2024 09:13:37 +0000 (11:13 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 13 Aug 2024 17:01:01 +0000 (10:01 -0700)
commita973f60dc7c178828e351ec4e68886ffecfbcadc
tree1dc78a861d10f3df03ffee3ea0210be5985fd36d
parent78f2210b3c8605144d62a90b58e888312f64efc8
path: stop relying on `the_repository` in `worktree_git_path()`

When not provided a worktree, then `worktree_git_path()` will fall back
to returning a path relative to the main repository. In this case, we
implicitly rely on `the_repository` to derive the path. Remove this
dependency by passing a `struct repository` as parameter.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/fsck.c
builtin/worktree.c
path.c
path.h
revision.c
worktree.c
wt-status.c