diff options
| author | Patrick Steinhardt <ps@pks.im> | 2025-02-07 12:03:29 +0100 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-02-07 09:59:21 -0800 |
| commit | f9467895d884908d5588fc920997b2e53dfb3302 (patch) | |
| tree | 2326fe2a0b5fb00b447be12c777947c6f3839988 /refs.c | |
| parent | path: refactor `repo_worktree_path()` family of functions (diff) | |
| download | git-f9467895d884908d5588fc920997b2e53dfb3302.tar.gz git-f9467895d884908d5588fc920997b2e53dfb3302.zip | |
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>
Diffstat (limited to 'refs.c')
| -rw-r--r-- | refs.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2146,7 +2146,7 @@ struct ref_store *repo_get_submodule_ref_store(struct repository *repo, if (!is_nonbare_repository_dir(&submodule_sb)) goto done; - if (submodule_to_gitdir(&submodule_sb, submodule)) + if (submodule_to_gitdir(repo, &submodule_sb, submodule)) goto done; subrepo = xmalloc(sizeof(*subrepo)); |
