MCPcopy Create free account
hub / github.com/git/git / set_git_dir

Function set_git_dir

setup.c:1091–1105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1089}
1090
1091static void set_git_dir(struct repository *repo, const char *path, int make_realpath)
1092{
1093 struct strbuf realpath = STRBUF_INIT;
1094
1095 if (make_realpath) {
1096 strbuf_realpath(&realpath, path, 1);
1097 path = realpath.buf;
1098 }
1099
1100 set_git_dir_1(repo, path);
1101 if (!is_absolute_path(path))
1102 chdir_notify_register(NULL, update_relative_gitdir, repo);
1103
1104 strbuf_release(&realpath);
1105}
1106
1107static const char *setup_explicit_git_dir(struct repository *repo,
1108 const char *gitdirenv,

Callers 5

setup_explicit_git_dirFunction · 0.85
setup_discovered_git_dirFunction · 0.85
setup_bare_git_dirFunction · 0.85
enter_repoFunction · 0.85
init_dbFunction · 0.85

Calls 5

strbuf_realpathFunction · 0.85
set_git_dir_1Function · 0.85
is_absolute_pathFunction · 0.85
chdir_notify_registerFunction · 0.85
strbuf_releaseFunction · 0.85

Tested by

no test coverage detected