Re: [PATCH 12/16] path: drop `git_path()` in favor of `repo_git_path()`
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Feb 7, 2025, 06:16 UTC
- Message-ID
- <Z6WlKtA-zvi5HJOI@pks.im>
- In-Reply-To
- <Z6Tcz79fVFGEe5Ao@ArchLinux>
On Fri, Feb 07, 2025 at 12:01:19AM +0800, shejialuo wrote:
Show 9 quoted lines
> On Thu, Feb 06, 2025 at 08:58:08AM +0100, Patrick Steinhardt wrote: > > Remove `git_path()` in favor of the `repo_git_path()` family of > > functions, which makes the implicit dependency on `the_repository` go > > away. > > > > In this commit, I have concerns that I have already commented at > [PATCH 10/16]. I don't think we should use "repo_git_path" in most of > time, we may use "repo_git_path_replace" for most situation.
As mentioned in that commit, I don't quite agree with you. We should do so if it allows us to reuse buffers, but if it doesn't it is totally fine to allocate and free C strings.
Patrick