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

Function strbuf_worktree_gitdir

path.c:406–416  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

404}
405
406static void strbuf_worktree_gitdir(struct strbuf *buf,
407 const struct repository *repo,
408 const struct worktree *wt)
409{
410 if (!wt)
411 strbuf_addstr(buf, repo->gitdir);
412 else if (!wt->id)
413 strbuf_addstr(buf, repo->commondir);
414 else
415 repo_common_path_append(repo, buf, "worktrees/%s", wt->id);
416}
417
418static void repo_git_pathv(struct repository *repo,
419 const struct worktree *wt, struct strbuf *buf,

Callers 1

repo_git_pathvFunction · 0.85

Calls 2

strbuf_addstrFunction · 0.85
repo_common_path_appendFunction · 0.85

Tested by

no test coverage detected