]> git.ipfire.org Git - thirdparty/git.git/commit
submodule: refactor `submodule_to_gitdir()` to accept a repo
authorPatrick Steinhardt <ps@pks.im>
Fri, 7 Feb 2025 11:03:29 +0000 (12:03 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 7 Feb 2025 17:59:21 +0000 (09:59 -0800)
commitf9467895d884908d5588fc920997b2e53dfb3302
tree2326fe2a0b5fb00b447be12c777947c6f3839988
parent93a8cfaf3c24f8c1f999b2ca5532ff8f46e0808d
submodule: refactor `submodule_to_gitdir()` to accept a repo

The `submodule_to_gitdir()` function implicitly uses `the_repository` to
resolve submodule paths. Refactor the function to instead accept a repo
as parameter to remove the dependency on global state.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/submodule--helper.c
path.c
refs.c
submodule.c
submodule.h