From 3181d86320f748b7b4f7a7133f2127e825eed702 Mon Sep 17 00:00:00 2001 From: Brandon Williams Date: Thu, 22 Jun 2017 11:43:40 -0700 Subject: path: add repo_git_path and strbuf_repo_git_path Introduce 'repo_git_path' and 'strbuf_repo_git_path' which take a repository struct and constructs a path into the repository's git directory. 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 568d63be5..c779c4aa2 100644 --- a/path.h +++ b/path.h @@ -35,6 +35,14 @@ extern char *mkpathdup(const char *fmt, ...) extern char *git_pathdup_submodule(const char *path, const char *fmt, ...) __attribute__((format (printf, 2, 3))); +extern char *repo_git_path(const struct repository *repo, + const char *fmt, ...) + __attribute__((format (printf, 2, 3))); +extern void strbuf_repo_git_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.1