Thread (68 messages) flat view 68 messages, 4 authors, 1d ago

Re: [PATCH v3 4/6] setup: defer object database creation

From: Patrick Steinhardt <hidden>
Date: 2026-08-06 06:02:58

On Wed, Aug 05, 2026 at 04:21:39PM +0200, Toon Claes wrote:
Patrick Steinhardt [off-list ref] writes:
quoted
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:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help