🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.git
Article #2679

Re: [PATCH v4 5/6] log: speed up --follow following renames for non-linear history

#2679
From: Miklos Vajna
Date: Mon, 09 Nov 2026 08:02
23 lines
10124 bytes
Hi Patrick,

On Fri, Nov 06, 2026 at 03:14:11PM +0100, Patrick Steinhardt <ps@pks.im> wrote:
> With unrelated histories this would return no bases at all, and hence
> we'd always return 0 in such a case. But 304812ed33d (log: improve
> --follow following renames for non-linear history, 2026-06-22)
> explicitly mentioned the use case of sub-tree merges of unrelated
> histories, so isn't this a regression?

You're right. The existing '--follow finds the pre-merge commit through
a subtree merge' test didn't catch this, because there no parent has the
path unchanged, so follow_needs_renames() is not called.

When there is no merge base, follow_needs_renames() now returns 1, so
renames are followed as before.

I've added a new '--follow finds the history of a copied file through a
subtree merge' test to 1/5 in v5 for such a case, and 5/5 now passes it.

Thanks,

Miklos
Technical Details
Message-ID: <avF-HwjximDD54P_@collabora.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-74876-linux-kernel-git=dewy.ru
References: <au3gswJZzhutGlpR@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-74876-linux-kernel-git=dewy.ru
From: vmiklos@collabora.com (Miklos Vajna)
Newsgroups: linux.kernel.git
Subject: Re: [PATCH v4 5/6] log: speed up --follow following renames for
 non-linear history
Date: Mon, 9 Nov 2026 09:02:39 +0100
Organization: Usenet Network
Message-ID: <avF-HwjximDD54P_@collabora.com>
References: <au3gswJZzhutGlpR@pks.im>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Injection-Info: usenet.network;
	logging-data="303592"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:Ydich/s/cfiGUs2XPzmz6ePwUNU= sha256:72SFAdkZvN7NU0L3X92AYkGEzGYbgoJ1KfWSr4jJE30=
	sha1:P+fhSmtrpwsn/oFDNIiCT4pviSQ= sha256:OzZsXEpQUfbR2CMfTUiLp5DJqHDXVQDsfzzlb4thsgE=
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 145C1113724; Mon,  9 Nov 2026 11:04:53 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -2.751
X-Spam-Status: No, score=-2.751 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_INVALID=0.1, DKIM_SIGNED=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=fail (1024-bit key)
	reason="fail (message has been altered)" header.d=collabora.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 mSZ3_pslcWAO;
	Mon,  9 Nov 2026 11:04:48 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=git+bounces-74876-linux-kernel-git=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=collabora.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 72480113691; Mon,  9 Nov 2026 11:04:40 +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 D02DB87B6D; Mon,  9 Nov 2026 08:02:56 +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=3; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1794211376;
	b=wSbsrg+/xRrBa2ublTajny9wOE8Z+8egc6U2Wf3EE1dMpJFA5Lzdf88q3/PpJ68xDUk5
	 DrvkMrLljA3xsSkQvCRnn6xg6+J/K7Bsw2D+6MAQar/Qmdk7GrvYiKRlf1TRCc5Gw08rt
	 t47ukCuPVQp5f0nxsXPCLYVZ8q1tGjckZFI3zxVT32f4b9DjcgMmvRWfRFo86955/k1A7
	 GjvqThegdLz7ZDSiOOAh660UBAXDKKOFMeMlhhCKNcBrt8cDfg2sWLLfeD+DnXyu/D3Ti
	 bf/C1nHLZaCcvPPvs44dtasKje+nL8VxcOHmeWOSxdouelqanilXGpCY5PTEgOKbaLw==
X-ARC-Message-Signature: i=3; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794211376;
	h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:Date:
	 From:To:Cc:Subject:Message-ID: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:
	 X-Zoho-Virus-Status:X-Zoho-AV-Stamp:X-ZohoMailClient;
	bh=CoVh8zCoOvW4QQjWFWdMPXXpCrebYkVZEHzFBS7+HGY=;
	b=uy3UR8ubCs1Aj3xZr6h8H8jZfJYuSAEbzkeZ2kp3RdwGWvk2zmmR++CMe6EpR8KHtWGq
	 DIWxbnGZEdZr6ddIrHM+j9EsljP8KS/paYtXnzQiTtvhlha9wE+swQRxBUBMMsKjqryuD
	 Zsp7SpTMkUzwRhLqIrE3TsA3UPmH7JBf/ngS+Bn7ruT0fDgwCFy3JVHOIkfQ2bSDiMJ+d
	 jjq6yfDuseMehjwGkGi1Oz229QxQJtH2pDFDq2Ki+iPwiQw+a/hEZTTRPYzya/Pndetwt
	 rdbngVXF16TqR3sdgkIim135n6ojwDSWKM7MHB98ZW0K8PlJd0BFf82th3ce2vEUvIw==
X-ARC-Authentication-Results: i=3; smtp.subspace.kernel.org; 
	dkim=fail reason="signature verification failed" header.d=collabora.com header.i=@collabora.com header.a=rsa-sha256 header.s=zohomail header.b=Fm2m8Vo2;
	dmarc=pass header.from=collabora.com;
	spf=pass smtp.mailfrom=collabora.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 A5468606A32A;
	Mon,  9 Nov 2026 08:02:56 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=fail reason="signature verification failed" (1024-bit key) header.d=collabora.com header.i=@collabora.com header.a=rsa-sha256 header.s=zohomail header.b=Fm2m8Vo2
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=165.173.180.123
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1794211375;
	b=HrZaaSkUc+iYZOzOekuVwaDS/a/42VRLTy2/T1U3Sney93nPHpmBfiGvoxV92VCB++Tm
	 B/qAXmGrtcNvgvMNF7MYy1YzKhGvyBHo3lUtzQi4Mldt/vD2DHgmg27fAJqRKXSaIfM0G
	 5BZ9JBEEYuZoUI+RUkaZQ7PtEy0uNuP+OfembdoolHLNJcWI2kSmcbo5IOzTjE9ZitxQA
	 KPkhhauuJNtGBGEzSXDHowGPkV70niKOinSLEFxsDyYKrzVbdLmHo5zLuIQWaDBixXRn7
	 y+3m+x+ejzLnPo7J7+FMt2CbwOSnr7lzvWIIVPbKMldrsGyAJeO+RBzBU7iIZwYWW8w==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794211375;
	h=DMARC-Filter:DKIM-Signature:Received:Date:From:To:Cc:Subject:
	 Message-ID:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:
	 X-Zoho-Virus-Status:X-Zoho-AV-Stamp:X-ZohoMailClient;
	bh=CoVh8zCoOvW4QQjWFWdMPXXpCrebYkVZEHzFBS7+HGY=;
	b=1o/csXKRHYOUGil+60zrRLTttVaFnTWvF7MfnUoDxpFjyOUApZtBijdlsGW2pUzibsih
	 tTfyL2CEWQOlFXHZuXSEFjtBT8WFTkPI4zCgZCMkUmyeAygnYnbpEcfHHVgIBazIPuFp2
	 3IGAK4c6TByO6uB1Wic0icbDGndu/pZvLNNqH+WjiSxcMnTVwSnqqPR346WHJMeXriKH+
	 G0uydIUB8g4pCCpVHJnzZk4DboUK8DPpHMK/y+lyvLvbzR05oFHQMiHKmnxjMYwOFnn/L
	 IL4MbVLQ/7o+Ulb6Zx6BRsLotwKUBW+cHohdw8JXV2rNCijdcLbCba4S5DEosRiPL9w==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dmarc=pass header.from=collabora.com;
	spf=pass smtp.mailfrom=collabora.com;
	dkim=pass header.d=collabora.com header.i=@collabora.com header.a=rsa-sha256 header.s=zohomail header.b=Fm2m8Vo2;
	arc=pass header.oldest-pass=0 smtp.remote-ip=165.173.180.123
X-Received: from sender6-pp-g123.zoho.com (sender6-pp-g123.zoho.com [165.173.180.123])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 59F98606A31C
	for <git@vger.kernel.org>; Mon,  9 Nov 2026 08:02:55 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 59F98606A31C
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com
X-ARC-Seal: i=1; a=rsa-sha256; t=1794211367; cv=none; 
	d=zohomail.com; s=zohoarc; 
	b=lveHLaG6AWxO9lBWfpVK4795pazRGKPulD0OkTCzhXH0H226h3R3YTK7MciwixrqQ9PfVE8QH46HiyWB93RbfzLSHJ+YdaXnQsSC5mTZY2hc3M6v6oM1O5HmY2wNlLc+bqf0hfG0PmyHmiiOJg55dm1AvgY8BPaT+edByvEBmBI=
X-ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; 
	t=1794211367; h=Content-Type:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; 
	bh=CoVh8zCoOvW4QQjWFWdMPXXpCrebYkVZEHzFBS7+HGY=; 
	b=YkrvckJUmCW7doL4qQnv+UxkPxgWa2dZO929XZuRiEJljSu4NEsLY/6lSgG2LHfj6141IqGNuGC5GmdE1OA8HbkEQGLi+HBSA3nwxeQfDECXabx/QjC/M+lA/azf1/iehSG4490SMMKL742P5QDUa0/S97uO9oRo0Su+x2L1ekE=
X-ARC-Authentication-Results: i=1; mx.zohomail.com;
	dkim=pass  header.i=collabora.com;
	spf=pass  smtp.mailfrom=vmiklos@collabora.com;
	dmarc=pass header.from=<vmiklos@collabora.com>
X-DKIM-Signature: a=rsa-sha256; b=Fm2m8Vo275Gyx0Z4eKkljpa6aaxxZTsC4/rRFvGTBzs12DPF1MVT8MO1hlqgTKLzIKNwnfFfLlpwqum4Gy/SkfT9ny/uoZ4ZzsY/HslZV5CsaizFDuK2tSwFESKaYQWRtOZrfSCUZ81OZwuIziWrzS0TidOKb8uAhf7dGaBzfDs=; c=relaxed/relaxed; s=zohomail; d=collabora.com; v=1; bh=CoVh8zCoOvW4QQjWFWdMPXXpCrebYkVZEHzFBS7+HGY=; h=Content-Description:Content-ID:Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Resent-Sender:Resent-Cc:Resent-Date:Resent-To:Reply-To:Resent-Message-ID:Resent-From:Sender:Subject:To:Date:From:Message-Id:Reply-To:Subject:To:Cc;
X-Received: by smtp.zohomail.com with SMTPS id 1794211365609297.20251466952186;
	Mon, 9 Nov 2026 00:02:45 -0800 (PST)
X-Cc: gitster@pobox.com, szeder.dev@gmail.com, git@vger.kernel.org
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: <au3gswJZzhutGlpR@pks.im>
X-Zoho-Virus-Status: 1
X-Zoho-AV-Stamp: zmail-av-0.2.13.1.5.4/294.182.33
X-ZohoMailClient: External