Re: [PATCH 02/16] path: refactor `repo_git_path()` family of functions
- From
Karthik Nayak <karthik.188@gmail.com>
- Date
- Feb 6, 2025, 11:53 UTC
- Message-ID
- <CAOLa=ZT8CrZA7Se98XBwS1CZjgvFFtKj5SBQfJNkG48QCvB=JQ@mail.gmail.com>
- In-Reply-To
- <20250206-b4-pks-path-drop-the-repository-v1-2-4e77f0313206@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
[snip]
Show 14 quoted lines
> @@ -241,11 +228,14 @@ struct strbuf *get_pathname(void); > # include "strbuf.h" > # include "repository.h" > > -/* Internal implementation detail that should not be used. */ > +/* Internal implementation details that should not be used. */ > void repo_common_pathv(const struct repository *repo, > struct strbuf *buf, > const char *fmt, > va_list args); > +void repo_git_pathv(struct repository *repo, > + const struct worktree *wt, struct strbuf *buf, > + const char *fmt, va_list args); >
The only thing that stood out to me was that we loose the `const` here for `repository`, I couldn't really find a reason why we do that, especially since `repo_common_pathv()` right above still has it. Everything else looks good in this patch.
[snip]