]> git.ipfire.org Git - thirdparty/git.git/commit
path: refactor `repo_submodule_path()` family of functions
authorPatrick Steinhardt <ps@pks.im>
Fri, 7 Feb 2025 11:03:30 +0000 (12:03 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 7 Feb 2025 17:59:22 +0000 (09:59 -0800)
commitf5c714e2a7d6239548b94c37ae906484e94b5bc7
tree54c3d9505625ccfd8b921c858742c89ed33fac15
parentf9467895d884908d5588fc920997b2e53dfb3302
path: refactor `repo_submodule_path()` family of functions

As explained in an earlier commit, we're refactoring path-related
functions to provide a consistent interface for computing paths into the
commondir, gitdir and worktree. Refactor the "submodule" family of
functions accordingly.

Note that in contrast to the other `repo_*_path()` families, we have to
pass in the repository as a non-constant pointer. This is because we end
up calling `repo_read_gitmodules()` deep down in the callstack, which
may end up modifying the repository.

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