| 486 | } |
| 487 | |
| 488 | const char *worktree_git_path(const struct worktree *wt, const char *fmt, ...) |
| 489 | { |
| 490 | struct strbuf *pathname = get_pathname(); |
| 491 | va_list args; |
| 492 | |
| 493 | if (!wt) |
| 494 | BUG("%s() called with NULL worktree", __func__); |
| 495 | |
| 496 | va_start(args, fmt); |
| 497 | repo_git_pathv(wt->repo, wt, pathname, fmt, args); |
| 498 | va_end(args); |
| 499 | return pathname->buf; |
| 500 | } |
| 501 | |
| 502 | static void do_worktree_path(const struct repository *repo, |
| 503 | struct strbuf *buf, |
no test coverage detected