From b42b0c09199db794b2a34ae9ce293d6711fb6a4f Mon Sep 17 00:00:00 2001 From: Brandon Williams Date: Thu, 22 Jun 2017 11:43:41 -0700 Subject: path: add repo_worktree_path and strbuf_repo_worktree_path Introduce 'repo_worktree_path' and 'strbuf_repo_worktree_path' which take a repository struct and constructs a path relative to the repository's worktree. Signed-off-by: Brandon Williams Signed-off-by: Junio C Hamano --- path.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'path.h') diff --git a/path.h b/path.h index c779c4aa28..9541620c79 100644 --- a/path.h +++ b/path.h @@ -43,6 +43,14 @@ extern void strbuf_repo_git_path(struct strbuf *sb, const char *fmt, ...) __attribute__((format (printf, 3, 4))); +extern char *repo_worktree_path(const struct repository *repo, + const char *fmt, ...) + __attribute__((format (printf, 2, 3))); +extern void strbuf_repo_worktree_path(struct strbuf *sb, + const struct repository *repo, + const char *fmt, ...) + __attribute__((format (printf, 3, 4))); + extern void report_linked_checkout_garbage(void); /* -- cgit v1.2.3