From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=202.12.124.158 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796289185; b=sFkyU6kyoRXcs0lnp4sIjxvdk9R9gaPBztCPovm8MzE7Fc0ojiiMBNV3Ig2dI7EdYZNn Vj7fZGNvQa935+ecnApmj+3dSHW3mO2rqDTmPaX3jtIKjTwcW78ehJhjQK1s6RvMvsAol opj+P/CUVMh2nGPmmNmJcGJuYNIMVToDrL6MjckFsJkh03AEdVUp1ixXyPyk1pZHWSGoX /iNiEen1J4tgA0C8YOCvl//lA0jISbzQNxGo7AG6SpB91w0wmwR2ZcLCYRgoRQU6y8o9k ccV6N3T9FrAQkk8S55+Njit2aP5UpR08PBJtj0LJ9nElMKb5GtQIdcpTCEb1FhdbLTg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796289185; 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=WDf21YbLT5iobAQ71na4iEmZ0X+7XostCxOhbWvfE3A=; b=DTmkst0QVrSYjjZ8bT7HrqH7aaqNOaomt308B1By8PNyursOiX++WCd+yT3YAhhdg76i PLZDOwc5U8R/LBRj2ry/KsrElBPG7BNEeHis7iFI7LLAugGdlQjQ/c44QFA1yWCvJSg96 8d9Dpe2u6z1i93B81zx/Q5iG/Drwqq8HhKi+7H1jUAe81Uf9U81QC0fl4XS9WZMEsXBfv yn+EF5RKxgoVLBtIGyga6eyy4DMoji1o0QivSXDrkLWhz5D/kZXCIld1MsSF/IRXyeaKv ThCrFi0LCbP4bjaC0qHo9UTA1XPC7P6eoG/LSRZwonotm8EnKbRc3DTMUj9i29Uf5TQ== 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=wwzb8Hka; dkim=pass header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b=4ftmNFWg; arc=none smtp.remote-ip=202.12.124.158 Received: from fhigh-b7-smtp.messagingengine.com (fhigh-b7-smtp.messagingengine.com [202.12.124.158]) (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 98CE8606A32C for ; Thu, 3 Dec 2026 09:13:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 98CE8606A32C 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=wwzb8Hka; dkim=pass (2048-bit key, unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b=4ftmNFWg Received: from phl-compute-10.internal (phl-compute-10.internal [10.202.2.50]) by mailfhigh.stl.internal (Postfix) with ESMTP id EB4897A01B7 for ; Thu, 3 Dec 2026 04:13:03 -0500 (EST) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-10.internal (MEProxy); Thu, 03 Dec 2026 04:13:03 -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=1796289183; x=1796375583; bh=WDf21YbLT5 iobAQ71na4iEmZ0X+7XostCxOhbWvfE3A=; b=wwzb8HkamRM+iRBOV2POH+yh7t a/PK8W9wJ4jjHuvHssVCJVIJV1pZy2cowKV5ncXdq5BW2ncmMqORUpqxQzsWrVQf lSxeC145zuroI/98TC5q5U9quLABDh8id/Mhn62WzccAV5Ty/yaWfg9aHF/AEbaC BZC9P5nHl9Eg4eWsW61pKEHUSQ/lpUHNnrHYJboaPVg6EseZsBEFkuR0yNnQMg0E H/OcZHqVQUPZhNmz0HzA1synWYVVhZdD0CLF7pzajosKThgGIKwVluZnrEZA3eHH KltJvKc8D72xhy6fivlleoxVga8CT/aZ6jFE3W2vVo4GXRh8MO1VetYA20tA== 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= 1796289183; x=1796375583; bh=WDf21YbLT5iobAQ71na4iEmZ0X+7XostCxO hbWvfE3A=; b=4ftmNFWg91J/RNlQuhxAc7LtGLtdTpruwot2TQlwpIQHKFMKTRz kJwZZI4zSUcgLdbmpJvRttPePHVMPLcXrZoTXbZatehPbnCYLElenKYTn5O/3OZq iLWLfgcRBjxLcA6iTGyGn6JH6eYdXpKr7Z9p1oU1C09uQy0gYaxifiY4afgssu74 zkZDUMLcbXZXDA/fYB16GPVtGj1EgyG4dcppfKQkglLX4WTSxn2/uBb1E0qdw+qe mTVTdVx8FQSAd/eidMu4ImvI+ZqIFDeiO6+9ZaJSgPEPaf7GM6zd9GHjB3rrRRc6 O12DhCbVZwlyXFCXmTKT8g4mgJD1wu4O79Q== 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=1796289183; d=pks.im; mf=PHBzQHBrcy5pbT4=; rt=PGdpdEB2Z2VyLmtlcm5lbC5vcmc+; s=fm3:rsa-sha256:lMoeLlzTJMAbNj93IkskUcMvQQVZatnNjJRazK36X7fNJqf h5icw6yQaerNrqZ5dj1Aus2LOY9kXoDp4Ry7QsCObB0bWlLu5oPnPB1mFX1eREe2 SKG6bBJI59qupJwYS4Dx6rbh1S2S5+CId8wbnklDyfBzmiADhPjUkv9RzfXHjyZk HVjYmaN1r2+11T7iJoZbNmJ7fv2//oMcxNBUx4kiStOpqBBefkOr2gJuCn95Ogy0 d3W3MDXXZzRokZB4oW4eAlSiET50jFymRuwByDwmwI7dUIfpdOICJzeykJvOeVnS SXUgb6KmPwH+z7GeIhZlmOzwQrlCAqNGDMgOp9A==; 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:uImNH4Ejxv43zSpxfB2eJtIyrBcwafu8iPvCDmq99ww=:vQtxix8wBVDsrjaMTbfoxJR6toYQAWkt3IGeukjtW40=; X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTGIclzxEPYUO9jrnOi3jReDmWiCPo/mGC4ALNDAbe1CQyLfZLFyUlKm4S+85NnBuf oXkz6X+SXU0RpOGgNfR+WVYRgosEqYG8ETHOEyhnis/4pfkq948tEuUDLZZ1XqJ11BRUWP /PK4Zm4OXozVTTLMe4jpCDfUcEzBB6H7LNTzI6ZIGEVBVYIJOZ+05caHFVibMos/JRJcuq l/VPE7xy0W2xDKUniSgB+La5OUwIEupmlh2CHVYlRVYCbQ9gvB/HbUqByreAASkLVqbweP Ct5q6xGgz9fNpeVsM0q9CB4FUY04DmqRDubyzWlZHdmGc2lWmRMxrNqCPoUwnFACLD13jO 7sLWg6FqWCjrLmb8RodRh8SCdfNajYIeT2h+hDxaeSulKBcVHPa+03lJQq38hykA4cJPoO bq19V3Rt8UQQkU+0ji/ZWGMjPJQyhN9IJeyPChi28xk3HU9N6C7EbOYG2Pd8x7SfoZaIIX kDnkZ9lf4x2Hw277sPX5aKvLYMy0WO3iRKMbzJ+crt0EfSpvdbndOwlnPVDxji1SPNhA3u iqFnV6IBPenWBKwM5O4+iX1Gz9InYLTMHXikCh35jNzOJBYWZfgJI/HIcVuy7phEAmtLi5 zDfbtY/SKfytKsvzMCLzr6eRe8YMLDSmT7w++UEbQwszh0vP4SVhWnUP0V6A X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 3 Dec 2026 04:13:02 -0500 (EST) Received: by mail (OpenSMTPD) with ESMTPSA id e7da74ee (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 3 Dec 2026 09:12:59 +0000 (UTC) Date: Thu, 3 Dec 2026 10:12:56 +0100 From: Patrick Steinhardt To: Justin Tobler Cc: git@vger.kernel.org, Junio C Hamano Subject: Re: [PATCH v2 1/7] commit-graph: verify all trailer hashes against the chain file Message-ID: References: <20261120-pks-odb-pluggable-commit-graphs-v2-0-31f2341a9932@pks.im> <20261120-pks-odb-pluggable-commit-graphs-v2-1-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 08:31:26AM +0100, Patrick Steinhardt wrote: > On Wed, Dec 02, 2026 at 04:29:11PM -0600, Justin Tobler wrote: > > On 26/11/20 01:22PM, Patrick Steinhardt wrote: > > > @@ -341,6 +342,32 @@ test_expect_success 'warn on base graph chunk incorrect' ' > > > ) > > > ' > > > > > > +test_expect_success 'tip layer trailer must match chain file' ' > > > + git clone --no-hardlinks . tip-trailer && > > > + ( > > > + cd tip-trailer && > > > + test_line_count = 2 $graphdir/commit-graph-chain && > > > + tip_file=$graphdir/graph-$(tail -n 1 $graphdir/commit-graph-chain).graph && > > > + corrupt_trailer "$tip_file" && > > > + git -c core.commitGraph=false log >expect && > > > + git -c core.commitGraph=true log >actual 2>err && > > > + test_cmp expect actual && > > > + test_grep "commit-graph chain does not match" err > > > + ) > > > +' > > > > With this test we corrupt the trailer of the tip layer and check that is > > was indeed validated. Previously it would have been ignored. The base > > layer should still be loaded and used though, but we don't really check > > explicitly which layers were kept. Not sure it there is a good way to do > > that anyway though. > > Not that I'd know of, at least. `test-tool read-graph` gives us some > info, but it doesn't give us the ability to figure out which layers have > been loaded. Now we could of course extend it to give us that info, but > I'm not sure that's worth it for a single test. > > Hmm. That being said, the test-tool works somewhat funny in that it > seems to only give information about the uppermost layer. So we can > assert that initially it covers less commits, and then when we corrupt > the uppermost layer it covers more commits because it uses the base > layer now. > > I'll adapt the test a bit. Oh, well, I couldn't resist, so I've now gone the full route and have extended the test-tool. Funny enough, extending the infra actually lets me deduplicate some test logic, and so overall we actually remove more code than we add even though we now have more capabilities: t/helper/test-read-graph.c | 9 +++++++++ t/lib-commit-graph.sh | 62 ++++++++++++++++++++++++++++++++++++++------------------ t/t4216-log-bloom.sh | 15 ++------------ t/t5318-commit-graph.sh | 34 +++++++++++++++---------------- t/t5324-split-commit-graph.sh | 69 ++++++++++----------------------------------------------------- t/t5328-commit-graph-64bit-time.sh | 10 ++++----- 6 files changed, 87 insertions(+), 112 deletions(-) So it's a win-win, except that it's going to be two more patches to review. But that's your problem :P Patrick