From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.167.175 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== 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== 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 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 ; Wed, 2 Dec 2026 23:38:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org DC074606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com 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 Received: by mail-oi1-f175.google.com with SMTP id 5614622812f47-4af81963f35so9512804b6e.0 for ; Wed, 02 Dec 2026 15:38:46 -0800 (PST) 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) 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) Date: Wed, 2 Dec 2026 17:38:42 -0600 From: Justin Tobler To: Patrick Steinhardt Cc: git@vger.kernel.org, Junio C Hamano Subject: Re: [PATCH v2 5/7] commit-graph: decide mergeable and chainable layers by depth Message-ID: References: <20261120-pks-odb-pluggable-commit-graphs-v2-0-31f2341a9932@pks.im> <20261120-pks-odb-pluggable-commit-graphs-v2-5-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: <20261120-pks-odb-pluggable-commit-graphs-v2-5-31f2341a9932@pks.im> 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