Re: [PATCH 01/20] path: expose `do_git_path()` as `repo_git_pathv()`
- From
Justin Tobler <jltobler@gmail.com>
- Date
- Aug 9, 2024, 16:58 UTC
- Message-ID
- <xl37sjpibmamkxdmpvfy44sijseuk5doizdlbnuodnbd6pdhxj@dws5e4wdu5lg>
- In-Reply-To
- <7ce3278f649ce70453242e5458d28c5fd54576ba.1723013714.git.ps@pks.im>
On 24/08/07 08:56AM, Patrick Steinhardt wrote:
> We're about to move functions of the "path" subsytem that do not use a
s/subsytem/subsystem/
> `struct repository` into "path.h" as static inlined functions. This will > require us to call `do_git_path()`, which is internal to "path.c".
So in other words, functions leveraging `the_repository` in "path.c" are going to be moved to "path.h". Since these functions depend on `do_git_path()`, we need to expose it. Makes sense so far.
> Expose the function as `repo_git_pathv()` to prepare for the change. > > Signed-off-by: Patrick Steinhardt <ps@pks.im>
[snip]
Show 8 quoted lines
> +/* > + * 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); > +
Out of curiousity, do we have a preferred convention for how functions accepting `va_list` are named? Searching through the codebase, I don't see a ton of consistency, but I have noticed examples prefixed with "v".