Re: [PATCH v3 4/6] setup: defer object database creation
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Aug 6, 2026, 06:02 UTC
- Message-ID
- <anQjhlnvvhKLOFPV@pks.im>
- In-Reply-To
- <8733ws6424.fsf@emacs.iotcl.com>
On Wed, Aug 05, 2026 at 04:21:39PM +0200, Toon Claes wrote:
Show 19 quoted lines
> Patrick Steinhardt <ps@pks.im> writes: > > > In a subsequent commit we'll make the creation of the on-disk data > > structures of an object database pluggable. This will lead to an > > in-between state where we have already configured the repository's > > object database, but it's not usable yet until we eventually call > > `create_object_directory()`. > > > > Defer the object database creation so that we handle both steps in the > > same function. > > With [PATCH v3 3/6], Justin's objection[1] is stronger now: > > > Naive question: would it be simpler to just require invoking `odb_new()` > > explicitly after `apply_repository_format()` in all cases? There doesn't > > appear to be too many callsites. > > As a matter of fact, I've given this a try and see these changes on top > of this series below.
The reason I was hesitant to do this is that I want to move `apply_repository_format()` into `repo_init()` eventually. But I guess moving the call to `odb_new()` out of it doesn't really prevent that. So... fine, I'll do it.
Patrick