Article View: linux.kernel.git
Article #2335Re: [PATCH 05/10] commit-graph: merge the two commit graph writers
From: Derrick Stolee
Date: Wed, 04 Nov 2026 16:33
Date: Wed, 04 Nov 2026 16:33
25 lines
11969 bytes
11969 bytes
On 11/4/2026 10:57 AM, Patrick Steinhardt wrote: > We have two entry points for writing commit graphs: > > - `write_commit_graph()` either writes a commit graph for all commits > in the object database, or for the commits specified via its options > struct. > > - `write_commit_graph_reachable()` writes a commit graph for all > reachable commits. > > It's somewhat pointless though to have a separate entry point for > writing a commit graph for reachable commits, as this use case can be > trivially satisfied via a flag. > > Introduce that flag and drop the separate entry point in favor of > `write_commit_graph()`. This ensures we have a single entry point for > writing commit graphs, only, which will make it easier to eventually > introduce pluggable commit graphs via the object database. The previous four patches were immediately obvious to be correct. This one takes a little bit more work, but is a valuable simplification that will lead to better code reuse in the future. Thanks, -Stolee
Technical Details
Message-ID:
<9a97d8ca-e7c9-4e57-905b-109df92a9eae@gmail.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-74449-linux-kernel-git=dewy.ruReferences:
<20261104-pks-commit-graph-write-refactorings-v1-0-d013d9401a59@pks.im> <20261104-pks-commit-graph-write-refactorings-v1-5-d013d9401a59@pks.im>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-74449-linux-kernel-git=dewy.ru
From: stolee@gmail.com (Derrick Stolee)
Newsgroups: linux.kernel.git
Subject: Re: [PATCH 05/10] commit-graph: merge the two commit graph writers
Date: Wed, 4 Nov 2026 11:33:11 -0500
Organization: Usenet Network
Message-ID: <9a97d8ca-e7c9-4e57-905b-109df92a9eae@gmail.com>
References: <20261104-pks-commit-graph-write-refactorings-v1-0-d013d9401a59@pks.im>
<20261104-pks-commit-graph-write-refactorings-v1-5-d013d9401a59@pks.im>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
logging-data="3432589"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:vwkkwYlhLkE0ixr2FgRTUbZsH28= sha256:R5nWy3GDPhh1JMkXv+MnEjlVyMF1+ncDbeHWgrdzNek=
sha1:PTRhSsNzdBto0x8Kg7B6wdFXEsI= sha256:FMJVs7YKMLVh+hq2VJoeEB2yWfEU/yw6bnSCGPqG4MI=
Content-Language: en-US
List-ID: <git.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
by mail.dewy.ru (Postfix) with ESMTP id 585F2112C6A; Wed, 4 Nov 2026 19:47:09 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.049
X-Spam-Status: No, score=-3.049 tagged_above=-9999 required=6.31
tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001,
FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
header.d=gmail.com
X-Received: from mail.dewy.ru ([127.0.0.1])
by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id 3mmijUMuW4Wy;
Wed, 4 Nov 2026 19:47:06 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=git+bounces-74449-linux-kernel-git=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
by mail.dewy.ru (Postfix) with ESMTPS id 43001112C4C; Wed, 4 Nov 2026 19:46:58 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by tor.lore.kernel.org (Postfix) with ESMTP id EB2E330419; Wed, 4 Nov 2026 16:33:19 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1793809994;
b=EomCN++uSktMS4zn71fn+Gw7jQOyMX9hmK0FK68KL6EtkT/qy9MVMOT7IBn1M3MtgPck
12Ou6BFL9WWhl7K3bKZQ1xbA8rU3Y7brGSJH87HYsrdvzPd4OEONEM/NdPiOkR2wN/2lM
YnHbVAC8qINbeakq0mtKBZ6Re3ZUVJvpjzY5V730E3XA4PwAdDsB/JIeS7ur2S5TqVXiB
OicLdvNTsHBOFo35USCWgOtHqUQcsk4EQcbOlTqdS44GjaP9ZwnYXGlmcX9mZDYa+ztP3
7/tCGYfIfc7+RJHCGxNugRREDR4ThocAL3vJsL+/bXvIZK/s70lCRLGipGiqDu9K8KA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1793809994;
h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-Received:
Received:Message-ID:Date:X-Mailing-List:List-Id:List-Post:List-Help:
List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version:
User-Agent:Subject:To:References:Content-Language:From:In-Reply-To:
Content-Type:Content-Transfer-Encoding;
bh=dMqNS4Zq9+1VDYW+MgkC5/i/I446jAAXuMOMG2PQZR0=;
b=HxfvcNE7UQmbMnLHIoORWQxd+OnTFTEgPeBszbCdYLA3yDJ4huPmFH0QPo5b3+Mx0q6K
c0DPLFaxWLW6SBrxj6iaLwKpxTHgY2OiFYwt066gcjeuxavWYobOikxmGq82bIiWydXKi
TseCTyAvksiTPgKiYIB0sxovjTVBTo4ZEicrQbjzPfKafhSArboO5K7gGHotLsqdzUmYY
Ip0R4WbE8mWWrdTON6CMyuMusCq1OtFes8eMq1cQwBztaCGxx614UV6tizlx0/g9fXP9E
QZfc9JiCcSh5F9pASzxTsWAnWX3floxDzP/yn/zo7oN+e0W//RIn33cHpeSYWCI2u3Q==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=oSIgTcxD;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 87333606A33D;
Wed, 4 Nov 2026 16:33:14 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=oSIgTcxD
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.219.41
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1793809993;
b=b34SFJkpPDNF3GY79Yt3bvyMoSIX9GjAF1PAhDlHnQjdhHv2TkVL1lgkLR5ya7gtMApK
QMB+EcRAc/F5cbcNiZl3DldexqSPf/JuHX8dsW4ez48g5LO6Bx+pdkzyr2P0DoixleKce
fir7FxZH7h6LCMeaPABI2WTdjvfT46FuskpUxEYhdiAuFV7voN0jYyGFb0qMMJZJsHARA
3q+C5saTMiFBr2XbxboAtzE8+UsYjlhsfWSBj+O2kz2Vs89llwOZ5cI2j3ye4UyyJv5zi
0xJb+nG6SquZ6iRYmvQNEAiEykk30UfLS5NqJgL2Nkd6mnlaLx6LEy7/0vdkJWw90ag==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1793809993;
h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
X-Gm-Message-State:X-Gm-Gg:X-Received:Received:Message-ID:Date:
MIME-Version:User-Agent:Subject:To:References:Content-Language:From:
In-Reply-To:Content-Type:Content-Transfer-Encoding;
bh=dMqNS4Zq9+1VDYW+MgkC5/i/I446jAAXuMOMG2PQZR0=;
b=DQDgKYnBLT5QsGOeWQmpDve6PBxcHcrhhZqizF/u3fZPdzLbRaMi3HdkRDuFiSiprtc+
avtyH5JymQagQyvbb7XVWyRLQGk71doz8Ni1b29ai48yvCKwmZBlY9vBEU1B7wwT8ZXQW
+KZ/ZROCE6Xc35s5VEqPm7c/1SmvMzSab7kARClr1vuzWwfTR3ZHilZEoaUSzHyFGnh/D
56tNmv54BgyBVbLquDzD7poWbDR4zkavGez1aljm8B5s+r9/IXuLLNXhEiOrFfSAkSw2M
J8zbEPet8mKSYoFLquQ6A0E2j9kJSTMb7FFJeQenHlO/8q9WDKQ81yyAp624CpJ8Mww==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=oSIgTcxD;
arc=none smtp.remote-ip=209.85.219.41
X-Received: from mail-qv1-f41.google.com (mail-qv1-f41.google.com [209.85.219.41])
(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 52744606A334
for <git@vger.kernel.org>; Wed, 4 Nov 2026 16:33:13 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 52744606A334
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-qv1-f41.google.com with SMTP id 6a1803df08f44-91ccfb88e4dso9555656d6.0
for <git@vger.kernel.org>; Wed, 04 Nov 2026 08:33:13 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20260707; t=1793809992; x=1794414792; darn=vger.kernel.org;
h=content-transfer-encoding:content-type:in-reply-to:from
:content-language:references:to:subject:user-agent:mime-version:date
:message-id:from:to:cc:subject:date:message-id:reply-to:content-type;
bh=dMqNS4Zq9+1VDYW+MgkC5/i/I446jAAXuMOMG2PQZR0=;
b=oSIgTcxDWAbyovJdO5AuNaMn7WVxu6/VibqSkdK75RkRwjCItvwfP/AsNQYuDnn+f0
mWtjfs1lvd/RYWYxLBSSCQhmPjhXn7hqHAPbq425AmyDUcwMg05pGWnEfO3PmquvpeeO
Wt83jheLZTTRiKxh2uk9kNFeYHXJeTmxyYG2LP5oCTQ+LW8TFN9pDt5Z6ETsffvUVWN4
4f/Ewu4xXWSh/oUIHlUbDYYJATxIhX4Prt5rFtpEZdbykGMImH+eqholFSjOurGjLIqp
O0RTl8qFf3ah6fgfizPPZqWRjrHZlbLSj0Rscjso2xqXbIdyrhEFM5i3vExUYMJu9kzl
9+2A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1793809992; x=1794414792;
h=content-transfer-encoding:content-type:in-reply-to:from
:content-language:references:to:subject:user-agent:mime-version:date
:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date
:message-id:reply-to:content-type;
bh=dMqNS4Zq9+1VDYW+MgkC5/i/I446jAAXuMOMG2PQZR0=;
b=HUBm4gOGOQWVf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esKnr78+0iYdqaLrO2gwfZ/xob7Tkfs+a7DhOAWIENF2omZA092Hsu1A+ue0wlOqMJjrGfG6+
sT9gf1nLq6U4tgBcid8C6jXkWk9HdwTRfMbtjDy+B0ZGpY8C3/YS9BW/B9yIcUZC4mSD/mFZIlk
npwk+0oTWI8dcWuIDNQC9qv9TmUXeakKtFKhB/1Vz0PAfdp2IO2cPh
X-Received: by 2002:a05:6214:2c0c:b0:91c:8f30:fa3f with SMTP id 6a1803df08f44-91ca4b75870mr284619226d6.46.1793809992060;
Wed, 04 Nov 2026 08:33:12 -0800 (PST)
X-Received: from [192.168.1.109] ([136.61.86.144])
by smtp.gmail.com with ESMTPSA id 6a1803df08f44-91e7dfb3aadsm22653556d6.8.2026.11.04.08.33.11
for <git@vger.kernel.org>
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Wed, 04 Nov 2026 08:33:11 -0800 (PST)
X-Mailing-List: git@vger.kernel.org
X-List-Post: <mailto:git@vger.kernel.org>
X-List-Help: <mailto:git+help@vger.kernel.org>
X-List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:git+owner@vger.kernel.org>
X-Precedence: list
X-User-Agent: Mozilla Thunderbird
X-In-Reply-To: <20261104-pks-commit-graph-write-refactorings-v1-5-d013d9401a59@pks.im>