🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.git
Article #2204

Re: [PATCH v3] range-diff: add --matched-only to skip one-sided commits

#2204
From: "Matt Hunter"
Date: Tue, 03 Nov 2026 01:56
40 lines
9449 bytes
On Mon Nov 2, 2026 at 8:10 PM EST, Ben Knoble wrote:
>> Le 2 nov. 2026 à 19:16, Junio C Hamano <gitster@pobox.com> a écrit :
>> 
>> I thought Harald's case was to take the patches from the previous
>> round of the topic and rebase them on top of a different base (e.g.,
>> updated origin/master), so there is no suitable single <base> for
>> the three-rev form, but I may have misunderstood his example.
>
> I think origin..old-topic and origin..new-topic 
> would both select only the “topic” commits as long as both
> bases are reachable from origin (which seems to be the
> described case, to me).

Put another way, every commit reachable from origin is excluded from
either side of the range-diff.

Harald's example uses the symmetric difference syntax.  I think this
effectively treats the merge-base of the two tips as the shared base in
the range-diff.  It can't tell the difference between new commits that
are part of the topic and ones that are only there by virtue of advancing
the topic's (real) base.

So, I think this <A>...<B> form would yield the expected output if you
only rewrote history in-place _on the same base commit_, but not in the
general case?

>
> I agree with Matt that better selection of inputs to range-diff 
> makes this specific case better :) 

When I run this command, I almost always say it like this (with the topic
checked out)

    git range-diff master @{1} @
                          ^
                          or, @{u}
                depending on the workflow
Technical Details
Message-ID: <DML7B6VVFDH0.3RKFXWKOH0X2L@lfurio.us>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-74242-linux-kernel-git=dewy.ru
References: <xmqqcxsmg473.fsf@gitster.g> <427F4BDB-B21B-468E-9C6A-4A7FE3F13688@gmail.com>

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-74242-linux-kernel-git=dewy.ru
From: m@lfurio.us ("Matt Hunter")
Newsgroups: linux.kernel.git
Subject: Re: [PATCH v3] range-diff: add --matched-only to skip one-sided
 commits
Date: Mon, 02 Nov 2026 20:56:59 -0500
Organization: Usenet Network
Message-ID: <DML7B6VVFDH0.3RKFXWKOH0X2L@lfurio.us>
References: <xmqqcxsmg473.fsf@gitster.g>
 <427F4BDB-B21B-468E-9C6A-4A7FE3F13688@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
	logging-data="3076204"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:IL2tjtFeTo5oW3vJ/5FrmkQ1dHE= sha256:mQo3FjRabg6L1ZcOxIDPktNL0np/0xodDAEsyJhTqho=
	sha1:CoyjH2AznZYfoi0aD6D3C0sxuAk= sha256:syGEQ+NiH0oVhaFOT8COMf2VnXgGNtUL1sjRvALSjkA=
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 E5FA61126F8; Tue,  3 Nov 2026 04:57:30 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.151
X-Spam-Status: No, score=-3.151 tagged_above=-9999 required=6.31
	tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
	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 (1024-bit key)
	header.d=lfurio.us
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 REPtdrn7O_nT;
	Tue,  3 Nov 2026 04:57:24 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=git+bounces-74242-linux-kernel-git=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=lfurio.us
X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])
	by mail.dewy.ru (Postfix) with ESMTPS id 9FEAF111D53; Tue,  3 Nov 2026 04:57:16 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sto.lore.kernel.org (Postfix) with ESMTP id 6A29160130A; Tue,  3 Nov 2026 01:57:15 +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=1793671034;
	b=oNdi42qwWlmjOyOmxN9cY4f+ctYWSrHvh48AhA29ihEjBj4u96KfZ/p2cB0UYwj4lP1j
	 gVk2FraM1n+tcJtxFhUrncPsnUUBLohNsryZZXMa6d7R39KPxrJTqNTzQpUuEpMgL0pst
	 FJ5oFpGElf7gdI8gWbDbNdMlQ8F/TolMTJrHVCKwXYU49yA1Lh+n/lfpJLuSnaSz+ysou
	 bkeNSo9333TUDKcp38usuDSmChC6a9xZ0hEmsYsYY4USUT2HTa2uCEGyzX67FbaqR0sLr
	 nXLtHXBZ+a7q530H26bZxr25jxUDqD3eMflGXf08icojdvKNhddkTPPfq7Gbcfanw0A==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793671034;
	h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:
	 X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:Mime-Version:
	 Content-Transfer-Encoding:Content-Type:Date:Message-Id:Subject:Cc:To:
	 From:X-Mailer:References:In-Reply-To;
	bh=ki8N214MhwT9XcXAohKUvykybwpi8wTp0AEK0dt4MQM=;
	b=VkgUMnxftuaJxnAYGWZoC+fWQ7ZYvBGLOS3tdqyAMaAO/4LOlGyhqFw7NXpnyK056LmD
	 /bGo5Wn6bgsee3QNTRwM1OOaDJ6TyBKGZufgJDHRQZKuNeUPOFtzmbCpYW63t3ghBf4IE
	 Y/gG64Q7cT3JdbV/0T26uMFH81SrYg3kSpwmwVR4YZN91UAD1BgJFzmjcaAYufYQvatWm
	 0buPgJhzyxchko4+3I4EBGTubFtPyZF/uXFWr3nvfJZXFROdbtz0esLwmZoMCtyV81sMB
	 j9T0dTtVjgCXWLlqt+MIrrwMNz1hLXvg7EJxuHgFUWZJ2y9DjKrMEz0/dT/yLG/IvFw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=lfurio.us header.i=@lfurio.us header.a=rsa-sha256 header.s=default header.b=GzcKDu94;
	dmarc=pass header.from=lfurio.us;
	spf=pass smtp.mailfrom=lfurio.us;
	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 7F8D1606A32E;
	Tue,  3 Nov 2026 01:57:14 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key, unprotected) header.d=lfurio.us header.i=@lfurio.us header.a=rsa-sha256 header.s=default header.b=GzcKDu94
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=157.230.60.252
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1793671033;
	b=WXSntCaesWqGTXkeg3G4ovux7jv5p8pwz8tWI+MvfQ/4a6kK3/Dx357vuFLys7agD/nE
	 kz7i7nvZOcLLEwCKOinlyX6HhHdI4U5LRW6ybgJ8SJDi4/0XCsvqD5LO4cbtazrqyvXLI
	 FcbRcHgo6iEsbgfCpMffJ98w4O3jQHxg1nujy1ZexuDGRivZY0TEycb7PqLBfu5eubz2W
	 5MfKouXwEEgcha+71BSRdo8jGbcKDZ3IJToAJgj8X2qJFnd1fRdWWo4SepYRNwireLhzD
	 o3lb1nyMiZJrM/WAQzGjGBPoeirM9hHc7lnXjlscy3fd5ABNKGVQpUISxBu7sIgxovA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793671033;
	h=DMARC-Filter:DKIM-Signature:Received:Mime-Version:
	 Content-Transfer-Encoding:Content-Type:Date:Message-Id:Subject:Cc:To:
	 From:X-Mailer:References:In-Reply-To;
	bh=ki8N214MhwT9XcXAohKUvykybwpi8wTp0AEK0dt4MQM=;
	b=G1Tv9w5k5SVEMAnj/So8V/4Txfc0i4g+FasCq2jor/hvzaXp29TaZ5o3zHdvUi3gCGAh
	 XzGfxmu05pP1tOkTS45DD1B3KBtdH+mMXd+T9BxXL8a/EPKg+3FblL0hdEtM2F3HpDqun
	 sIgbvsAQQoh9v5F14H+USiDnnXB5yaHHKDJoXd8ZWoyMoQvViJX8QuP6rzY+nb86FwRXJ
	 t30+H0tEt4CHCFNppUWOdJNkHwhYDyPX3ApgQs74ESlPpmem4aI97qzyrdLKNBCP/2tfl
	 ARcPtSxPfNZRUrhFgdM1k7s4ll/GhRdDPfAyeluprjUSfX6dViRDRn/VPTdLquPn6DQ==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=lfurio.us;
	spf=pass smtp.mailfrom=lfurio.us;
	dkim=pass header.d=lfurio.us header.i=@lfurio.us header.a=rsa-sha256 header.s=default header.b=GzcKDu94;
	arc=none smtp.remote-ip=157.230.60.252
X-Received: from mail.normalmode.org (h01.normalmode.org [157.230.60.252])
	(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 D630A606A324
	for <git@vger.kernel.org>; Tue,  3 Nov 2026 01:57:12 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org D630A606A324
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lfurio.us
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lfurio.us
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lfurio.us; s=default;
	t=1793671031; bh=fnTYAqyZlJm5TS3jw5+ziOjQcyP28c3JhBU0swZEQa4=;
	h=Date:Subject:Cc:To:From:References:In-Reply-To:From;
	b=GzcKDu94yF2HwpJmhXJNgZQ3Lalhrwe6Ul3P1Jt3rQfsdRmJYMrDrpxtLNlHG/iHE
	 TpaKeEWgGvZmPKPELIdXYDBuuL4vL39hg2fR7uIMw2rdPVBM8X1DVKkL7nVRpmfjY1
	 oS+ZeMR5XaTn4Irsa9rNHD8ABbud8uYyTm2kPzB4=
X-Received: by mail.normalmode.org (Postfix) with ESMTPSA id 81D4263149;
	Tue,  3 Nov 2026 01:57:11 +0000 (UTC)
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-Cc: "Harald Nordgren" <haraldnordgren@gmail.com>, <git@vger.kernel.org>,
 "Harald Nordgren via GitGitGadget" <gitgitgadget@gmail.com>
X-Mailer: aerc 0.21.0-0-g5549850facc2
X-In-Reply-To: <427F4BDB-B21B-468E-9C6A-4A7FE3F13688@gmail.com>