Message ID | 20250206-b4-pks-path-drop-the-repository-v1-0-4e77f0313206@pks.im (mailing list archive) |
---|---|
Headers | show |
Series | path: remove dependency on `the_repository` | expand |
On Thu, Feb 06, 2025 at 08:57:56AM +0100, Patrick Steinhardt wrote: > Hi, > > this patch series removes the dependency on `the_repository` from the > "path" subsystem. The series is structured as follows: > > - Patches 1 to 5 unifyf the interfaces that can be used to retrieve > repository paths (gitdir, commondir, workdir and submodule paths) > and adapts callers accodringly. > > - Patches 6 to 12 drop repository path functions that had an implicit > dependency on `the_repository`. > > - Patches 13 to 16 refactor "path.c"-internal code to stop depending > on `the_repository`. > Thanks for working on this. However, I feel a little hard when reviewing the code for patch 13 to patch 16. They are not so relevant to the previous twelfth patches. One thing I want to recommend is that we may combine the first and the second step. It is a little wired that we first refactor the code then we use the new one. When reading the code, I have to step back to the previous patch to understand something. Thanks, Jialuo
On Fri, Feb 07, 2025 at 12:14:14AM +0800, shejialuo wrote: > On Thu, Feb 06, 2025 at 08:57:56AM +0100, Patrick Steinhardt wrote: > > Hi, > > > > this patch series removes the dependency on `the_repository` from the > > "path" subsystem. The series is structured as follows: > > > > - Patches 1 to 5 unifyf the interfaces that can be used to retrieve > > repository paths (gitdir, commondir, workdir and submodule paths) > > and adapts callers accodringly. > > > > - Patches 6 to 12 drop repository path functions that had an implicit > > dependency on `the_repository`. > > > > - Patches 13 to 16 refactor "path.c"-internal code to stop depending > > on `the_repository`. > > > > Thanks for working on this. However, I feel a little hard when reviewing > the code for patch 13 to patch 16. They are not so relevant to the > previous twelfth patches. Thanks for your review! > One thing I want to recommend is that we may combine the first and the > second step. It is a little wired that we first refactor the code then > we use the new one. When reading the code, I have to step back to the > previous patch to understand something. But those are about very different things. The first step fills in missing interfaces and unifies the calling conventions, whereas the second step removes users of functions that don't have a dependency on `the_repository`. From my perspective, mixing these two steps up with one another would only lead to confusion as we're doing too many things at once. Patrick
Patrick Steinhardt <ps@pks.im> writes: > Hi, > > this patch series removes the dependency on `the_repository` from the > "path" subsystem. The series is structured as follows: > > - Patches 1 to 5 unifyf the interfaces that can be used to retrieve > repository paths (gitdir, commondir, workdir and submodule paths) > and adapts callers accodringly. > > - Patches 6 to 12 drop repository path functions that had an implicit > dependency on `the_repository`. > > - Patches 13 to 16 refactor "path.c"-internal code to stop depending > on `the_repository`. > > Thanks! > > Patrick > I've reviewed the series, apart from some small nits, the series looks great. Thanks for working on this. Karthik [snip]