From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fout-b6-smtp.messagingengine.com (fout-b6-smtp.messagingengine.com [202.12.124.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ADEB6429CCB for ; Tue, 4 Aug 2026 07:21:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.149 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785828108; cv=none; b=k8aBTUIiK8Zk05Us61YPCX2i3E/XQ8joKzTTLCBY8HUZqu/IKfTt7JwpxVKPnNAJ3e91pkTGYkgUrhmnW8UPsY8d/FVi1jpinuhL/mOtf9n+zqSmBDm0pncCBX2L1gQrfj7/cLROklfo4ydQ4e9I5iafg8ohjtKu/wj8h0QbUyw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785828108; c=relaxed/simple; bh=gVchj1NSgj/uTptwghogd11Sce5kiUxpCIb9ohAcxw8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=dwH15rdKjfUW/P3ym6Aqj76lX5TTZQm/6m4dIjwjcrFUhGaKMdhhnb3acMIOiydc4F7uZ09VgBa/iy8CNre41XqzYhOfnZghpE3u5b8ik7+Y6Fw56+OvvxXA1H6guKCl+4a04yiki/+MxNZFbSzsdPBOL00VPu9OnZpVNbF5Oek= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=Phb7CQDE; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=d+G7KiMJ; arc=none smtp.client-ip=202.12.124.149 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="Phb7CQDE"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="d+G7KiMJ" Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfout.stl.internal (Postfix) with ESMTP id 35B5F1D00181; Tue, 4 Aug 2026 03:21:47 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Tue, 04 Aug 2026 03:21:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1785828107; x=1785914507; bh=UA+lY+OfNS oXFo91/3gV5fEA1di0gb+F/XjR094doXE=; b=Phb7CQDEZreVYqbE3VmwTfayYO rh+/1NH8jepVaPWpljeUFJKYDP2okqX3tKmWW6WeV8QRj/lz9aDhaQWpqsbM8s6l z3cd4SEin9KEfVTuQseYSfYvII4q8g+xETC1UbesEJFXAQo0ZxlmndSDgHY0hz+n RM+2hVumHPzKG3Z88qoHMiUbt4kBf4CcLXUfv/b1GqBBjRgd9mNzICySpkVa5qsL xOqTgz361hUAL2LCCdup/0Upg0dNr2rVBg2XSO3GFp+5TnMW4jb5dEgDfQEo0saN cGWXNpRoc799ALWpdFh5kjNQRmYgSFO5Sdi+zCc8AQSsJ0hYI1w3k3Bl8u2Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1785828107; x=1785914507; bh=UA+lY+OfNSoXFo91/3gV5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SdczHKSV+ZCHxGPv6zFTBuAggDWpQlOJCaWf+wsTmg X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 4 Aug 2026 03:21:46 -0400 (EDT) Received: by mail (OpenSMTPD) with ESMTPSA id c8798474 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Tue, 4 Aug 2026 07:21:44 +0000 (UTC) Date: Tue, 4 Aug 2026 09:21:41 +0200 From: Patrick Steinhardt To: Justin Tobler Cc: git@vger.kernel.org Subject: Re: [PATCH 3/5] setup: defer object database creation Message-ID: References: <20260724-pks-odb-create-on-disk-v1-0-3b3d265d979b@pks.im> <20260724-pks-odb-create-on-disk-v1-3-3b3d265d979b@pks.im> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, Jul 28, 2026 at 04:13:42PM -0500, Justin Tobler wrote: > 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. I don't think it would, mostly because the logic to figure out the object directory and the alternate object directory requires a bunch of logic. I think it'll ultimately become simpler though once we move into the direction of what we've discussed in [1], where we said that we want to move handling of those environment variables into the "files" backend, too. And then it might make sense to revisit this. Patrick