The definition of this function is in path.c but its declaration is
in worktree.h, which is something unexpected. The function is
explained as "Similar to git_path()"; declaring it next to where
git_path() is declared would make more sense.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
struct repository;
struct strbuf;
struct string_list;
+struct worktree;
/*
* The result to all functions which return statically allocated memory may be
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.
*/
#include "bisect.h"
#include "packfile.h"
#include "worktree.h"
+#include "path.h"
#include "read-cache.h"
#include "setup.h"
#include "sparse-index.h"
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.
*/