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 8D698257435 for ; Tue, 4 Aug 2026 07:21:17 +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=1785828079; cv=none; b=nQZYEqQdfldrYxeRk++dD4EMXotoVYGItnz9HX8pf6acnpSjNF+JAeuMcR1z3oYa1zlITjA2wFHCxe3K9e4QzVnbIqeQ23rHV0nMZpfusqMy4O1u0mczxFTBsN1NxlS9Olqgof3A5lOvSfA4+o56Wwh1s6L5sC9eWevIg5bcnQc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785828079; c=relaxed/simple; bh=eabpD5YNvjJmPo5KKSqtO52OBPNPt34wT4I1FqpUKEo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Z3LES/HG3oxxi5NRMM0ElgunwikWXgePmE6Q4yEdGtrmgAAN3eJNaYRkaKv4+gfyyzBrrIIipmQ8fCINzDSO/Dq+cJVPAgjAwyPz34XUo2Rz5UbWpe0+7oAEdaYtnmP6dNEYW43bMKh8368nnaP/opRwVhHGXDX7w6QFvVphD7o= 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=f0asb9wz; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=JP/fRVFW; 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="f0asb9wz"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="JP/fRVFW" Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfout.stl.internal (Postfix) with ESMTP id C3E081D001C1; Tue, 4 Aug 2026 03:21:16 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-06.internal (MEProxy); Tue, 04 Aug 2026 03:21:16 -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=1785828076; x=1785914476; bh=CsOh1HSucC Vk/WGA3cv6h0CZHtUOc8TizcmL4FW3ZQ0=; b=f0asb9wzkzVGPCSvfmnZipK1yy LZ5oItyc+62mHKUk9xDhmzhjzhLadl7uqjJQxKR9icdSUvAKIReDQ2OHfDh986Cn yMVM8rnmW4yE8xYFrwY5kKVUjClH67JyLx0TxupInIfmac/40+mjNjz5yLz1g+XZ 4P6zCqos9oA3rHPx6g0YnbWwyUB+LuvBJNzzpVZ6VAx3iUg62DXu+kQc1j3v0jYK pY7bH6nVZAXpruBx8AMJ5I0JUwsaXp8V7M/SHSuy8u/Z3+DBUE14w6740BvTtSph Xe/NY0ckMjOHn0werj6Ln2JONlbg2ztTLr9XvSba7OMrMjrpU7s5Xb+ywk9g== 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= 1785828076; x=1785914476; bh=CsOh1HSucCVk/WGA3cv6h0C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uU+gbCJP3Vqkw X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 4 Aug 2026 03:21:15 -0400 (EDT) Received: by mail (OpenSMTPD) with ESMTPSA id 0402d251 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Tue, 4 Aug 2026 07:21:11 +0000 (UTC) Date: Tue, 4 Aug 2026 09:21:03 +0200 From: Patrick Steinhardt To: Toon Claes Cc: Justin Tobler , git@vger.kernel.org Subject: Re: [PATCH 1/5] loose: load loose object map for the correct source Message-ID: References: <20260724-pks-odb-create-on-disk-v1-0-3b3d265d979b@pks.im> <20260724-pks-odb-create-on-disk-v1-1-3b3d265d979b@pks.im> <87tspgd4p5.fsf@emacs.iotcl.com> 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: <87tspgd4p5.fsf@emacs.iotcl.com> On Thu, Jul 30, 2026 at 02:47:50PM +0200, Toon Claes wrote: > Justin Tobler writes: > > > On 26/07/24 05:48AM, Patrick Steinhardt wrote: > >> When loading the loose object map via `load_one_loose_object_map()` we > >> pass in both a repository and the corresponding source. We ultimately > >> don't really respect the passed-in source though as we instead always > >> load the map via the common directory. This doesn't make any sense > >> though, as the function is called in a loop through all sources, and as > >> such the expectation is that we'll load the map that belongs to the > >> given source. > >> > >> Fix this bug by instead loading the map via the loose source's path. > > > > IIUC the primary source is always being used, does this mean that > > repositories using a compat hash and alternates are currently broken? > > Yeah, the commit message seems to undersell this fix. > > I think it wouldn't hurt to add a small test for this: > > test_expect_success 'rev-parse maps oid of object borrowed from alternate' ' > test_when_finished rm -rf alt borrow && > > git init --object-format=sha256 alt && > git -C alt config extensions.compatObjectFormat sha1 && > test_commit -C alt A && > > git init --object-format=sha256 borrow && > git -C borrow config extensions.compatObjectFormat sha1 && > echo "$PWD/alt/.git/objects" >borrow/.git/objects/info/alternates && > > oid=$(git -C alt rev-parse HEAD) && > git -C alt rev-parse --output-object-format=sha1 "$oid" >expect && > git -C borrow rev-parse --output-object-format=sha1 "$oid" >actual && > test_cmp expect actual > ' Good idea indeed, will do. Thanks! Patrick