From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=103.168.172.159 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796303933; b=nQcMRKlGAv2BYav5g6FS1zMNrPoY52RM45b9L2+h+bbPv/Gc7iboL8Qhj1AuVgOENZp7 r2u8a8UtNlA4fXqMI/t4MJyOxe7N2gk8AL9OsQPKRTeyRsoBAhq78giyCIf9VzyRwVHm6 SW0NUcWzYF6UVFETCKISYFAfhLxWjBNisPBL9EdFAOV6qX2TxIYAfKa8dTeY07HEi/iaP CaZMqrTiFlpou1W2DOiC79OsbGyu3uoT1p516w4nn3WHgE0KK7BA36h5nsormLymn3qQy to8Esq8tybBQf0qjo6WeEkyOYv8ln5JiXZX2/umcWigdubavCZehdOFoe+/4BOw1DaQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796303933; h=DMARC-Filter:Received:Received:DKIM-Signature:DKIM-Signature: X-DKIM2-Info:DKIM2-Signature:X-DKIM2-Info:Message-Instance: X-ME-Sender:X-ME-Received:X-ME-Proxy-Cause:X-ME-Proxy:Feedback-ID: Received:Received:Date:From:To:Cc:Subject:Message-ID:References: MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=wPeI15PwmB1JUsSV7e8LMn510OuOMsK6x+hfy3Cu9bQ=; b=jP5abhIPGiBBck9DM1IaS/1js45cQX5lS7mEtRMenGURr7KPnXjBHlLD0Fbkjiw8zbro s3fTWxlLs5K7Pji0clyqXWwKROCRnXpdi9+x6BKFjSwQ8FB/MA7XIU1Dwo9/z0Meo9hmp 3Ry+nj6wmhaME7EqyqY6Jjnn2eg7Jmacb6u/rVhrgx4jg+FILRZlsAUTn8tA3eKdmYx2X rvB96eB8Og6YcSrbVcLAJoSnnh055ap/Dr2LcjH+uzSU75F17cFtbrJZ/FGJfNqMX4c8I Wpk+UN3Lm4ad/gEEoSQtplwY6Ffuq6x6/HL5yZ0p44N+zf/0UCShGRl+077ibzxM8ig== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass header.d=pks.im header.i=@pks.im header.a=rsa-sha256 header.s=fm3 header.b=JY1lXwU6; dkim=pass header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b=JWYrW6Ca; arc=none smtp.remote-ip=103.168.172.159 Received: from fhigh-a8-smtp.messagingengine.com (fhigh-a8-smtp.messagingengine.com [103.168.172.159]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0EC81606A32D for ; Thu, 3 Dec 2026 13:18:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 0EC81606A32D 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, unprotected) header.d=pks.im header.i=@pks.im header.a=rsa-sha256 header.s=fm3 header.b=JY1lXwU6; dkim=pass (2048-bit key, unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b=JWYrW6Ca Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfhigh.phl.internal (Postfix) with ESMTP id 33E8214000FC for ; Thu, 3 Dec 2026 08:18:52 -0500 (EST) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Thu, 03 Dec 2026 08:18:52 -0500 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=1796303932; x=1796390332; bh=wPeI15PwmB 1JUsSV7e8LMn510OuOMsK6x+hfy3Cu9bQ=; b=JY1lXwU6M/aDmk5GJasJlUwmou 7ryxF3zlwtJ0X0BI2of5aRacJ7auXQCoVk/RZelMRg99ayOEFqQkDrfoxv7YKf4t 98OlrqlyLHuBhuNcNF0Vsl/LMuF2jGYmhCdapzSDDysh/ptpNYY7d15guECYC31g F5EcNT6jNy4X/to/SX1NWWDaTh+57d4qWw2ki6XoDmzVHkNmAzJqmx8voSrokUBi pkTtd0OAenagpoik+UtF5Z1iBtJ8ih5k+CzVdUofOMq44UucI8q4Vb9heX/cC2I1 gD8cGw5ZR7kXXInvL9Dp2udjoTjuBXTvx5muh++Dk+fIroCspBvbBhWWVwGw== 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= 1796303932; x=1796390332; bh=wPeI15PwmB1JUsSV7e8LMn510OuOMsK6x+h fy3Cu9bQ=; b=JWYrW6Ca1zkT19+elRDfBe/czXBnpY/tsV/8ZolU/yP/a6ivUTn mKK8x4QK774U7lscb5P3BJ1+yZxsTIVUm5o32pCpc2Rq0NWOpMfMArN8zY8YubVB bSvOVEsmS/P2cy3vVSBZAlPiSpP7HFjUGi3ohVJHmjoiNbxNXiW2EFNVo/rDEHQe VUXO1KsqrSqRUOSZIG1JCAz/oIHBmYICAOLSycrQOzgpf5a7k4TjIKR5TrD3ZsCF RvnX/l1sjtb/rLeJI2UM46wizjpEXH7XNzEtIwD7M3rOYJEPFM2cCH9UTXtB1OdY 9UV4Kq0PxAG0CF5K+UJ8b0qShPE5xWFsrXw== X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-09; repo=github.com/dkim2wg/interop; date=2026-11-03; sw=lmtpprox; action=sign d=pks.im a=rsa-sha256; DKIM2-Signature: i=1; m=1; t=1796303932; d=pks.im; mf=PHBzQHBrcy5pbT4=; rt=PGdpdEB2Z2VyLmtlcm5lbC5vcmc+; s=fm3:rsa-sha256:fSbKzNSDkAz3hR6y+EKoo0KNIlGzxEDlf9+5pGlW92sN4h7 vC1rnfcFdDx7RCmgIZsHIxVuei3JC3NJPh9QQhR5ISlJ6n6+aXCyVWxWuCXO3FLd hQO6dfra4gVi7xajlTnN2wuCZy143Wgdnt9FsAhoOTHMbQwQSEJP4JtNHcGU2cgk 5gAS1T6SiideavwcH3PhIehIGH7FvUR5z14wlcj+yiqWd1d4xjbwNN7HgdlZgHRe XMHViGxv707b1GCJXluBhPmHODgCm/4vcVRxhXQUI3y59HNCNyXiTaBgsywG7+zO vOoqS2Y78KgRZFXMCaMZoI6UOiUqFv79DKHhiDw==; X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-09; repo=github.com/dkim2wg/interop; date=2026-11-03; sw=lmtpprox; action=mi-m=1; hc=12; hn=cc,content-disposition,content-type,date,feedback-id,from, in-reply-to,message-id,mime-version,references,subject,to; Message-Instance: m=1; h=sha256:5ekfOaBN3TTfDm0lXv67Vf7QZCPezV16OcSxA1fP6HM=:swcCNKl0jq67A0q4utKI4gMCIU5D3jzqENPmmxn4c/o=; X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTG1EVUBHus7sz4I/BIjCycVJvTBD+Vz2OVdqnGfzXVpykanRGUKvoxKfV2yCBDo/t IXtbBK/cTRU85LWQfSWEzSiv9rLcDl5LxCs66C/ZqgBRS3dOo38Fverc7tA+i4FJQC/9YL KWOsC0sbHLijoiGPANZni1e7Hd73QJZEus8Bqc1Y++hPzthy0hgSt1ca/MbJBT95Arayx7 1NNV46Xchdg4T3zqBpo+QrjtWJTIN0D8047M2ZEFHcaiRwUFHwySldgKtSGtPCzQSsYtBg bKqpElwgApQtLrNcbuuW3eYAmHeKZ8jOOFFly2T5+U5REiehkWQ8kCiyBlF+o+YCRIw2mX deYtSojmTO/Vgq82lcwp7DCFiP60jSFZ01L1SlxKlzRBLwLG7NkSWdn2o3bHPO7QijorTz lQKkW/pZvNuQldKMJlmAFMBizRjToOUnZ728K807rUvXwLMkhvkrU9pctJeat8w7l2MwTC WLIIQybgbRNd/RmXiVgxuIVpe/TdqwhYegDtFy0Voaji1Ivdf37X7fYfDA+7k94b3wZ3JG LEMstLh44tR5GagqoL1y3ii1WZHsn4kcwGb8hoF8X3365FzWEFAMhKokPKeOS0YmAqC9dO HqpeBp0vHAz5DvYYsQV4Hxjr19vxZFCzSk6Swi1pnt2LExzAsQOyAaIUIFng X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 3 Dec 2026 08:18:51 -0500 (EST) Received: by mail (OpenSMTPD) with ESMTPSA id 400370e8 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 3 Dec 2026 13:18:22 +0000 (UTC) Date: Thu, 3 Dec 2026 14:18:18 +0100 From: Patrick Steinhardt To: Kaartic Sivaraam Cc: Junio C Hamano , git@vger.kernel.org Subject: Re: [PATCH v2 2/7] commit-graph: simplify linking commit graph chains Message-ID: References: <20261120-pks-odb-pluggable-commit-graphs-v2-0-31f2341a9932@pks.im> <20261120-pks-odb-pluggable-commit-graphs-v2-2-31f2341a9932@pks.im> X-Mailing-List: git@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Thu, Dec 03, 2026 at 03:33:09PM +0530, Kaartic Sivaraam wrote: > On 11/20/26 17:52, Patrick Steinhardt wrote: > > When we load a commit graph chain we verify for every layer that the > > hash of the base commit graph matches what the current tip has in its > > base graphs chunk. To do so we pass both the chain itself as well as the > > array of object IDs that we have read from the commit-graph chain file > > to `add_graph_to_chain()`. > > > > But the array of object IDs is redundant information: we have already > > loaded and linked the base layers, and as part of that we have stored > > their respective hashes in the structure itself. Consequently, we can > > already derive the hashes by walking the chain of base layers. > > > The hashes stored in the structure are the layers' trailers, not the hashes > from the chain file. They only agree because the previous patch now compares > each layer's trailer with the chain file right after loading it. Since this > function becomes public so that the backend can call it, could the comment > in the header say that it validates `g` against the trailers of `base`, and > that callers are expected to have verified those against the chain file > themselves? Fair, this is a bit stale now. I'll reword this a bit: But the array of object IDs is redundant information: starting with the preceding commit we already verify that the hash of the layer matches the hash in the chain file. And consequently, we can derive the hashes by walking the chain of base layers. Patrick