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:
@ -835,7 +835,7 @@ static void write_refspec_config(const char *src_ref_prefix,
|
||||
|
||||
static void dissociate_from_references(void)
|
||||
{
|
||||
char *alternates = git_pathdup("objects/info/alternates");
|
||||
char *alternates = repo_git_path(the_repository, "objects/info/alternates");
|
||||
|
||||
if (!access(alternates, F_OK)) {
|
||||
struct child_process cmd = CHILD_PROCESS_INIT;
|
||||
@ -1219,7 +1219,7 @@ int cmd_clone(int argc,
|
||||
|
||||
strbuf_reset(&buf);
|
||||
strbuf_addf(&buf, "%s/refs", git_dir);
|
||||
safe_create_dir(buf.buf, 1);
|
||||
safe_create_dir(the_repository, buf.buf, 1);
|
||||
|
||||
/*
|
||||
* additional config can be injected with -c, make sure it's included
|
||||
|
Reference in New Issue
Block a user