mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
Merge branch 'ps/path-sans-the-repository'
The path.[ch] API takes an explicit repository parameter passed throughout the callchain, instead of relying on the_repository singleton instance. * ps/path-sans-the-repository: path: adjust last remaining users of `the_repository` environment: move access to "core.sharedRepository" into repo settings environment: move access to "core.hooksPath" into repo settings repo-settings: introduce function to clear struct path: drop `git_path()` in favor of `repo_git_path()` rerere: let `rerere_path()` write paths into a caller-provided buffer path: drop `git_common_path()` in favor of `repo_common_path()` worktree: return allocated string from `get_worktree_git_dir()` path: drop `git_path_buf()` in favor of `repo_git_path_replace()` path: drop `git_pathdup()` in favor of `repo_git_path()` path: drop unused `strbuf_git_path()` function path: refactor `repo_submodule_path()` family of functions submodule: refactor `submodule_to_gitdir()` to accept a repo path: refactor `repo_worktree_path()` family of functions path: refactor `repo_git_path()` family of functions path: refactor `repo_common_path()` family of functions
This commit is contained in:
6
refs.c
6
refs.c
@@ -2154,7 +2154,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));
|
||||
@@ -2192,8 +2192,8 @@ struct ref_store *get_worktree_ref_store(const struct worktree *wt)
|
||||
|
||||
if (wt->id) {
|
||||
struct strbuf common_path = STRBUF_INIT;
|
||||
strbuf_git_common_path(&common_path, wt->repo,
|
||||
"worktrees/%s", wt->id);
|
||||
repo_common_path_append(wt->repo, &common_path,
|
||||
"worktrees/%s", wt->id);
|
||||
refs = ref_store_init(wt->repo, wt->repo->ref_storage_format,
|
||||
common_path.buf, REF_STORE_ALL_CAPS);
|
||||
strbuf_release(&common_path);
|
||||
|
||||
Reference in New Issue
Block a user