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

Function do_worktree_path

path.c:502–512  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

500}
501
502static void do_worktree_path(const struct repository *repo,
503 struct strbuf *buf,
504 const char *fmt, va_list args)
505{
506 strbuf_addstr(buf, repo->worktree);
507 if(buf->len && !is_dir_sep(buf->buf[buf->len - 1]))
508 strbuf_addch(buf, '/');
509
510 strbuf_vaddf(buf, fmt, args);
511 strbuf_cleanup_path(buf);
512}
513
514char *repo_worktree_path(const struct repository *repo, const char *fmt, ...)
515{

Callers 3

repo_worktree_pathFunction · 0.85

Calls 4

strbuf_addstrFunction · 0.85
strbuf_addchFunction · 0.85
strbuf_vaddfFunction · 0.85
strbuf_cleanup_pathFunction · 0.85

Tested by

no test coverage detected