Git development
 help / color / mirror / Atom feed
From: Justin Tobler <jltobler@gmail.com>
To: Patrick Steinhardt <ps@pks.im>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 3/5] setup: defer object database creation
Date: Tue, 28 Jul 2026 16:13:42 -0500	[thread overview]
Message-ID: <amkXcmwzbBYsMgjc@denethor> (raw)
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

  parent reply	other threads:[~2026-07-28 21:13 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-24  3:48 [PATCH 0/5] odb: make creation of object database pluggable Patrick Steinhardt
2026-07-24  3:48 ` [PATCH 1/5] loose: load loose object map for the correct source Patrick Steinhardt
2026-07-24 17:26   ` Junio C Hamano
2026-07-28 20:14   ` Justin Tobler
2026-07-24  3:48 ` [PATCH 2/5] setup: detangle loading of loose object maps Patrick Steinhardt
2026-07-24 18:41   ` Junio C Hamano
2026-07-28 20:32   ` Justin Tobler
2026-07-24  3:48 ` [PATCH 3/5] setup: defer object database creation Patrick Steinhardt
2026-07-24 18:50   ` Junio C Hamano
2026-07-28 21:13   ` Justin Tobler [this message]
2026-07-24  3:48 ` [PATCH 4/5] odb/source: introduce function to map source type to name Patrick Steinhardt
2026-07-26 20:34   ` Junio C Hamano
2026-07-24  3:48 ` [PATCH 5/5] odb: make creation of on-disk structures pluggable Patrick Steinhardt
2026-07-26 20:42   ` Junio C Hamano
2026-07-28 21:23   ` Justin Tobler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=amkXcmwzbBYsMgjc@denethor \
    --to=jltobler@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=ps@pks.im \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox