| 404 | } |
| 405 | |
| 406 | static 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 | |
| 418 | static void repo_git_pathv(struct repository *repo, |
| 419 | const struct worktree *wt, struct strbuf *buf, |
no test coverage detected