diff options
| -rw-r--r-- | path.h | 9 | ||||
| -rw-r--r-- | revision.c | 1 | ||||
| -rw-r--r-- | worktree.h | 8 |
3 files changed, 10 insertions, 8 deletions
@@ -4,6 +4,7 @@ struct repository; struct strbuf; struct string_list; +struct worktree; /* * The result to all functions which return statically allocated memory may be @@ -82,6 +83,14 @@ const char *git_path(const char *fmt, ...) __attribute__((format (printf, 1, 2))); /* + * Similar to git_path() but can produce paths for a specified + * worktree instead of current one + */ +const char *worktree_git_path(const struct worktree *wt, + const char *fmt, ...) + __attribute__((format (printf, 2, 3))); + +/* * Return a path into the main repository's (the_repository) git directory. */ char *git_pathdup(const char *fmt, ...) diff --git a/revision.c b/revision.c index 7e45f765d9..9db534f852 100644 --- a/revision.c +++ b/revision.c @@ -29,6 +29,7 @@ #include "bisect.h" #include "packfile.h" #include "worktree.h" +#include "path.h" #include "read-cache.h" #include "setup.h" #include "sparse-index.h" diff --git a/worktree.h b/worktree.h index f14784a2ff..605ed6cb90 100644 --- a/worktree.h +++ b/worktree.h @@ -176,14 +176,6 @@ int is_worktree_being_rebased(const struct worktree *wt, const char *target); int is_worktree_being_bisected(const struct worktree *wt, const char *target); /* - * Similar to git_path() but can produce paths for a specified - * worktree instead of current one - */ -const char *worktree_git_path(const struct worktree *wt, - const char *fmt, ...) - __attribute__((format (printf, 2, 3))); - -/* * Return a refname suitable for access from the current ref store. */ void strbuf_worktree_ref(const struct worktree *wt, |
