MCPcopy Index your code
hub / github.com/git/git / get_worktree_git_dir

Function get_worktree_git_dir

worktree.c:227–235  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

225}
226
227char *get_worktree_git_dir(const struct worktree *wt)
228{
229 if (!wt)
230 BUG("%s() called with NULL worktree", __func__);
231 else if (!wt->id)
232 return xstrdup(repo_get_common_dir(wt->repo));
233 else
234 return repo_common_path(wt->repo, "worktrees/%s", wt->id);
235}
236
237static struct worktree *find_worktree_by_suffix(struct worktree **list,
238 const char *suffix)

Callers 7

add_rebase_filesFunction · 0.85
is_current_worktreeFunction · 0.85
update_worktreeFunction · 0.85
validate_no_submodulesFunction · 0.85
cmd_fsckFunction · 0.85

Calls 3

xstrdupFunction · 0.85
repo_get_common_dirFunction · 0.85
repo_common_pathFunction · 0.85

Tested by

no test coverage detected