Re: [PATCH 0/7] setup: enforce repo passed to `create_repository()` has no state
From: Kaartic Sivaraam <hidden>
Date: 2026-09-25 21:08:58
On 9/24/26 14:49, Patrick Steinhardt wrote:
when creating a new repository via `create_repository()` we pass in a repository. This repository is acting as an in/out parameter: the caller expects that it will be fully configured after the call, but the function itself also uses some information from the passed-in repository to figure out how exactly we want to create it. This interface is quite confusing, as it's not obvious at all what configuration of the repository is relevant. We have thus over a couple of patch series reduced the use of the parameter as in/out parameter. So now, the only piece of info that is still being propagated via the repo is "core.sharedRepository". This patch series cleans up that last remaining part so that the repo becomes purely an out-parameter. To ensure that this is the case we also start to `repo_clear()` it as a first step. Besides simplifying the interface, the intent is also to go further into the direction of unifying repository initialization in a follow-up patch series.
The patches seem to be well-split and the changes look good. It was a nice read. Overall, this series seems to look good to me. Thank you for making create_repository not rely on state from the repo given to it! -- Sivaraam