path: expose do_git_path() as repo_git_pathv()

We're about to move functions of the "path" subsytem that do not use a
`struct repository` into "path.h" as static inlined functions. This will
require us to call `do_git_path()`, which is internal to "path.c".

Expose the function as `repo_git_pathv()` to prepare for the change.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Patrick Steinhardt
2024-08-13 11:13:20 +02:00
committed by Junio C Hamano
parent 92a29c2c39
commit b6c6bfef31
2 changed files with 18 additions and 10 deletions

8
path.h
View File

@ -66,6 +66,14 @@ char *repo_git_path(const struct repository *repo,
const char *fmt, ...)
__attribute__((format (printf, 2, 3)));
/*
* Print a path into the git directory of repository `repo` into the provided
* buffer.
*/
void repo_git_pathv(const struct repository *repo,
const struct worktree *wt, struct strbuf *buf,
const char *fmt, va_list args);
/*
* Construct a path into the git directory of repository `repo` and append it
* to the provided buffer `sb`.