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

Function update_relative_gitdir

setup.c:1076–1089  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1074}
1075
1076static void update_relative_gitdir(const char *name UNUSED,
1077 const char *old_cwd,
1078 const char *new_cwd,
1079 void *data)
1080{
1081 struct repository *repo = data;
1082 char *path = reparent_relative_path(old_cwd, new_cwd,
1083 repo_get_git_dir(repo));
1084 trace_printf_key(&trace_setup_key,
1085 "setup: move $GIT_DIR to '%s'",
1086 path);
1087 set_git_dir_1(repo, path);
1088 free(path);
1089}
1090
1091static void set_git_dir(struct repository *repo, const char *path, int make_realpath)
1092{

Callers

nothing calls this directly

Calls 3

reparent_relative_pathFunction · 0.85
repo_get_git_dirFunction · 0.85
set_git_dir_1Function · 0.85

Tested by

no test coverage detected