diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-06-08 11:39:01 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-06-08 11:42:37 -0700 |
| commit | bf6a86236e829d08c92356e5c861193ccb516ef7 (patch) | |
| tree | bd1d8ae65b9ea3bb2cbf54935aefe2a1b4eb0a98 /path.h | |
| parent | 786a3e4b8d754d2b14b1208b98eeb0a554ef19a8 (diff) | |
| download | git-bf6a86236e829d08c92356e5c861193ccb516ef7.tar.xz | |
worktree_git_path(): move the declaration to path.h
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>
Diffstat (limited to 'path.h')
| -rw-r--r-- | path.h | 9 |
1 files changed, 9 insertions, 0 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, ...) |
