From: Justin Tobler Date: Tue, 28 Jul 2026 21:13:42 GMT Subject: Re: [PATCH 3/5] setup: defer object database creation Message-ID: In-Reply-To: <20260724-pks-odb-create-on-disk-v1-3-3b3d265d979b@pks.im> On 26/07/24 05:48AM, Patrick Steinhardt wrote: > 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. So IIUC, the repository gets configured via `apply_repository_format()` which invokes `odb_new()`. In this patch a APPLY_REPOSITORY_FORMAT_SKIP_ODB_CREATION flag is introduced to allow the creation of the ODB to be delayed until after source specific on-disk state has been created. 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. -Justin