| 416 | } |
| 417 | |
| 418 | static void repo_git_pathv(struct repository *repo, |
| 419 | const struct worktree *wt, struct strbuf *buf, |
| 420 | const char *fmt, va_list args) |
| 421 | { |
| 422 | int gitdir_len; |
| 423 | strbuf_worktree_gitdir(buf, repo, wt); |
| 424 | if (buf->len && !is_dir_sep(buf->buf[buf->len - 1])) |
| 425 | strbuf_addch(buf, '/'); |
| 426 | gitdir_len = buf->len; |
| 427 | strbuf_vaddf(buf, fmt, args); |
| 428 | if (!wt) |
| 429 | adjust_git_path(repo, buf, gitdir_len); |
| 430 | strbuf_cleanup_path(buf); |
| 431 | } |
| 432 | |
| 433 | char *repo_git_path(struct repository *repo, |
| 434 | const char *fmt, ...) |
no test coverage detected