🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.git
Article #4296

Re: [PATCH v2 5/7] commit-graph: decide mergeable and chainable layers by depth

#4296
From: Justin Tobler
Date: Wed, 02 Dec 2026 23:38
42 lines
12646 bytes
On 26/11/20 01:22PM, Patrick Steinhardt wrote:
> When writing a split commit graph, `split_graph_merge_strategy()`
> decides which layers of the existing chain get merged into the new
> layer and which layer the new one builds upon. This is decided on two
> simple rules:
> 
>   - A layer may be merged in case it is part of the same local object
>     directory.

Layers in an alternate object directory are not considered mergeable.
Makes sense.

>   - A layer may be added to the chain in case it is either a split
>     commit graph layer, regardless of whether it is local or not. Or in
>     case it is local, we may also add it to our chain in case it is a
>     non-split commit graph, in which case we convert it to a split one.

I found the wording here to be a bit confusing. IIUC, any existing layer
can be used as a base regardless of whether its in the primary or
alternate object directory. A normal "non-split" commit graph can also
be converted to have a layer added to it, but only if its in the local
object directory?

> These checks require us to know about where exactly these commit graphs
> are stored on disk as we compare directories of the respective files
> with one another to figure out whether or not a layer is local. So as a
> consequence, this policy becomes backend-specific once the backend
> controls where exactly commit graphs are stored.
> 
> Refactor the code so that we instead tell the merge strategy how many of
> the topmost layers are mergeable and chainable, respectively, which will
> let the backends decide on that property.

Ok IIUC, it sounds like the intent here is to have a generic means to
merge commit-graph layers without having to know about backend specific
details like where they are located on disk. Should the geometric
progression check also be part of the backend specifc logic? Thinking
about this some more, is the intent to make the commit-graph-chain
format itself pluggable?

-Justin
Technical Details
Message-ID: <axCmB3gV3urYuprN@denethor>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu.MISMATCH!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!git+bounces-76933-linux-kernel-git=dewy.ru
References: <20261120-pks-odb-pluggable-commit-graphs-v2-0-31f2341a9932@pks.im> <20261120-pks-odb-pluggable-commit-graphs-v2-5-31f2341a9932@pks.im>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu.MISMATCH!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!git+bounces-76933-linux-kernel-git=dewy.ru
From: jltobler@gmail.com (Justin Tobler)
Newsgroups: linux.kernel.git
Subject: Re: [PATCH v2 5/7] commit-graph: decide mergeable and chainable
 layers by depth
Date: Wed, 2 Dec 2026 17:38:42 -0600
Organization: Usenet Network
Message-ID: <axCmB3gV3urYuprN@denethor>
References: <20261120-pks-odb-pluggable-commit-graphs-v2-0-31f2341a9932@pks.im>
 <20261120-pks-odb-pluggable-commit-graphs-v2-5-31f2341a9932@pks.im>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: usenet.network;
	logging-data="2089121"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:QUHaHQIvCHJooWDIXZSSDN1/Ofw= sha256:ZuGh8gZlNtsIoPuzeep0/N/CloMS+uwSpH6eQV1XxLc=
	sha1:QDl9mShsDcE0PiYqBwnCdqF1YVo= sha256:cO2qxDis/gsXe6NPm3UffeeFvlj/l1LQKgxteoLJNrg=
Content-Disposition: inline
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 309CC11777B; Thu,  3 Dec 2026 02:39:05 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -1.949
X-Spam-Status: No, score=-1.949 tagged_above=-9999 required=6.31
	tests=[DCC_CHECK=1.1, 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 RBLtAOba6-W2;
	Thu,  3 Dec 2026 02:39:01 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=git+bounces-76933-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 sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 18FFE11773F; Thu,  3 Dec 2026 02:38:49 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id 4DB5329722; Wed,  2 Dec 2026 23:38:48 +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=1796254728;
	b=J1OdoIxHXeSEv+qOAWvsTH4KmiMykVfgGZrcZAupoXRAQfqiznnXMaLdoyxVnvOxDcTr
	 Hz1NzrE0dYCFccsZAN+VIyPYFMQ810D8Tots/IJ9pRCmljvU4mXDCMSI1qJthGm06oIIR
	 zb4nLQ1akbecjZ0hdAmCskXokTyqrW5uNe1gOvl5jcnt8itSeeF9+v00Cy8jWQ4Sd0j4M
	 WM7rAeItFegCgUyUaaBIaQENcBST8hLGHvQzIhG8L4qZJ5Pir3pfBE5eq/3sxIHufvnvt
	 Obr//PUzIndrLEYh9XWkK79O+exyvfazj8jATOWWRhPhxaE2sf1T4E5HZB5Z1/mznig==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796254728;
	h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
	 X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-Received:
	 Received:Date:From:To:Cc:Subject:Message-ID:References:X-Mailing-List:
	 List-Id:List-Post:List-Help:List-Subscribe:List-Unsubscribe:
	 List-Owner:Precedence:MIME-Version:Content-Type:Content-Disposition:
	 In-Reply-To;
	bh=WTGN5IgvBA8wq8Rg6+7SWQud6XI2S044jbMCDDKqVpc=;
	b=LBq4C+vuvUx4uGDKa6zNedyvNthigM8SrOMB19rrLjX6vOjZBTymJVtjTe19ZgjGctIM
	 RdyGsCgFUCxolg4+6q+2V1oqEFd0zbSmyWRmnAEoRQiBV4gKII9xjgjcTFPGc/8LCUUt5
	 q4Aqxurv90E9baDf3SI5j2BmwH6F08/AGtte1Qr4kI+4H3uGARUXfIKverRqqFdRTALi9
	 0EAbjW61oMCFYxJoVAbYk6K9+Mv3kbkzd9mYVmVtgf45H7S+QXX8AoGQT/YLCJ8HN42fu
	 onSn8sOJvOUrXBYwuLAOgcdIa2qOMIRHOVKpnuWAfLWHXSE1/LJBVi3iy/XLDYHgajg==
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=qSR2cU9c;
	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 25267606A333;
	Wed,  2 Dec 2026 23:38:48 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=qSR2cU9c
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.167.175
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1796254727;
	b=ObcbDiyU7ol7iTYc/2vDuQj0CaOgYJEMWlh2jzwFUpeux/nnClojh28ycXiCe/iNxCU5
	 LfVj+cWTLffJHvQaGovtIze+DBgwyFjcL922D0nsbl2TtiJWbrA0tO+MsPUxAUoaVzGkj
	 4YvDySQoyjT1DOkQq/5c2ZnzcKIkHD+QJjek7sDEgLrMQZgy0GGxyHC+uA6mZgDIEkfzU
	 9qALDF0gdxTxwAq+ONzuaBnVGukIFQDLWqkQtWhkdCQUaiOpno/vKppNA6u9kkn8wi23A
	 bsFmi8HjFMYDj7X2B9uiFUBY66Z+thebhlBDSw70S+vqwoa99upUku9QmjPcTudJ1zg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796254727;
	h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
	 X-Gm-Message-State:X-Gm-Gg:X-Received:Received:Date:From:To:Cc:
	 Subject:Message-ID:References:MIME-Version:Content-Type:
	 Content-Disposition:In-Reply-To;
	bh=WTGN5IgvBA8wq8Rg6+7SWQud6XI2S044jbMCDDKqVpc=;
	b=iLBBeN0x1k0+kfNFSsstc9mDlPYkV27i2wIxC6csQSKHP6yh69yakI/UdaRDVJZRbT0h
	 4+q5QmbwKxUB9lV/l26zioVEJdX6XdXjrnzT2Y5Pz54M2AwgvcW8c/CKmzpaCUBCzhcJS
	 fhl+g+5KaQkgqJZnUQ0ELEgvaKBLEOjeSpWtOGfRdY94SKcVvvuHMp1a8CxZZ0qsYavwP
	 uhAISKePgU2eG7n5iAzfRZKDxfoFnxcHGeVLKfu3r04aXtkbxYDA49sYljfFzD216Q+ls
	 IPGpnynu7PPxwuIMepH3PioQaDOzaHbYClovgDv4CEwzb3BwtgRCoC4eNyEP/PNzwvQ==
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=qSR2cU9c;
	arc=none smtp.remote-ip=209.85.167.175
X-Received: from mail-oi1-f175.google.com (mail-oi1-f175.google.com [209.85.167.175])
	(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 DC074606A322
	for <git@vger.kernel.org>; Wed,  2 Dec 2026 23:38:46 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org DC074606A322
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-oi1-f175.google.com with SMTP id 5614622812f47-4af81963f35so9512804b6e.0
        for <git@vger.kernel.org>; Wed, 02 Dec 2026 15:38:46 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20260707; t=1796254726; x=1796859526; darn=vger.kernel.org;
        h=in-reply-to:content-disposition:content-type:mime-version
         :references:message-id:subject:cc:to:from:date:from:to:cc:subject
         :date:message-id:reply-to:content-type;
        bh=WTGN5IgvBA8wq8Rg6+7SWQud6XI2S044jbMCDDKqVpc=;
        b=qSR2cU9cfx12rzUGwAYlj3jo4vbakcOx0gc+y+N+yjjnZqFW8Wzv+ySYyu6ksVnPxW
         ZCLNYVepbW7zakLBCZk+EeqsmXMwvNIep31lwL6Ak9c9zf4ybkIY6eGWzrz17G0Y8KPI
         Jk2reAxDTN5CoWOgD4ppH81wDS69VRBJWs615buROkjaygqOWsvqTt5a2Ovpn1GflqMQ
         qU7Zq+6xpdfxJSosQtnlFtnhCIhtqgnsc1IaOIaIAlV0J0hUAv8kZpSxklxIdrozDXQq
         QyNKKjW50XUfMT+SxRJrWgu68b0Xu2WJ8FKtrx0zqqBYly2tQacBjxIJi7OV7z/sIQzi
         9OSQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1796254726; x=1796859526;
        h=in-reply-to:content-disposition:content-type:mime-version
         :references:message-id:subject:cc:to:from:date:x-gm-gg
         :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to
         :content-type;
        bh=WTGN5IgvBA8wq8Rg6+7SWQud6XI2S044jbMCDDKqVpc=;
        b=Brn8PtEz0PxPd9MKEsdekqGi/OJXAatCyPmv7UyiZKRSnxd4YgJkPVQVf3XWnuX1zc
         10busMwKlFM22bmTPFZiAKahIqab0Nf7zK+EYCDxOyhO6UE/nbLn1+UuvekTwHNVeLVi
         nGQ2ghnSHd3KJoKqJqAs3Kd4jF0doB5gomqebN3hXbLe6UdkDWrucLu75waSpo+f9GGo
         jvgtuMQiKc5Mqc8/ljDx+ZJPjFuwWTTlXMj7GDdJ5af5slIiVNFCvqeaAYEnR5TRLhsY
         zj4dt/8nbFULynxP1fpiIymAIHSIAz5RWvE6ilAJVzIt2sHI5wlJiRyXcUyoOIVFFvjH
         HyBw==
X-Gm-Message-State: APuU4Z9U9AiyauySOThjLILk1sgbvHS1SVLcry6WfBLIbDTxZNyN+rsH
	zmYkjAZ4QRhZCEjFZTG6u6oqJfgRnACaHWyomB+0rO2CaTO5tuIIOZtP2qPQow==
X-Gm-Gg: AZFdTZdDgE1hKC1aMUn3rtaW7nWAs0V2o6gshGCR7UYRSa/dInhTQ0t3lENhgfpr34J
	bjJG2r8RTrDG2qbYc16w5FcCUUpasnYio0lOi1S2crdf4MoRp8UhtTAIr4KwdzeMiyCep2MR0uC
	k+HGealyDH/Ixy+5+L0b+4eXgb4efMnWmRrmewJju5IIF/p3Wc1DaLewtEqe/CJOudeIqvMNBos
	+6E9dfgzCa7pbkwW9qsieGi+jITmEyvxpCHrpFrmbWE6n8Ts0uSvNm6/D893ST+adRRmeEuJT32
	kpsgjIEyCrX6Ur99IVpLRkV3HpD0Vf8EXbVbfy66C2z/lsTfHXgX+gAb/yA/4O3dKClL4iUeT0p
	9kbwrMM77/3WcbWTAUuht9IL9jKAct3Ru8M8F6FkR7dzoWx7/MoKeDSADvpz5vNR3TrFb9HqST3
	gQw+zcrKUw66To/6AoDvVDbHsTQs9Fx/vcoASia8Rgw+b6bY0hK67mrIIz02G1/lcRK/9pjDZNA
	AxfBS4MxM1ZBUiFr43PQJhsoWqQkCfzxSd8ghujPQ9MY78E6QGWMMMqqoq3DQzssx2xnTjCy6Uu
	gHRYtBznpO/LEicwLo2tpHOeh1rmanQzroMsQx+8H7OYUTqVJ3LB
X-Received: by 2002:a05:6820:1607:b0:71a:f794:49b9 with SMTP id 006d021491bc7-71bacc600b7mr15629907eaf.61.1796254725729;
        Wed, 02 Dec 2026 15:38:45 -0800 (PST)
X-Received: from localhost ([136.51.44.64])
        by smtp.gmail.com with ESMTPSA id 006d021491bc7-71b3806ef20sm29433226eaf.7.2026.12.02.15.38.45
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Wed, 02 Dec 2026 15:38:45 -0800 (PST)
X-Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
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-In-Reply-To: <20261120-pks-odb-pluggable-commit-graphs-v2-5-31f2341a9932@pks.im>