| 225 | } |
| 226 | |
| 227 | char *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 | |
| 237 | static struct worktree *find_worktree_by_suffix(struct worktree **list, |
| 238 | const char *suffix) |
no test coverage detected