Article View: linux.kernel.git
Article #1184[PATCH v3 0/4] log: speed up --follow following renames for non-linear history
From: Miklos Vajna
Date: Thu, 22 Oct 2026 20:45
Date: Thu, 22 Oct 2026 20:45
55 lines
10828 bytes
10828 bytes
Hi Junio, On Mon, Oct 19, 2026 at 08:11:05AM +0200, Miklos Vajna <vmiklos@collabora.com> wrote: > This leads to a larger patch: should I extract the "rethink the > approach" and the new tests to separate patches or it doesn't matter? Here is a series where I split the changes into 4 patches: add more tests, a refactor, then your suggestion to start over (with one more test) and finally the speedup. Thanks, Miklos Miklos Vajna (4): t4219: test more --follow cases across merges log: extract showing the remerge/combined diff of a merge commit log: simplify --follow following renames for non-linear history log: speed up --follow following renames for non-linear history log-tree.c | 201 +++++++++++++++++++++++++----------- t/t4219-log-follow-merge.sh | 128 +++++++++++++++++++++++ 2 files changed, 271 insertions(+), 58 deletions(-) Interdiff against v2: diff --git a/t/t4219-log-follow-merge.sh b/t/t4219-log-follow-merge.sh index 9616ac64ed..c8474ed151 100755 --- a/t/t4219-log-follow-merge.sh +++ b/t/t4219-log-follow-merge.sh @@ -144,6 +144,22 @@ do ' done +test_expect_success '--follow follows renames through a fork with -m' ' + git -C diamond log --follow -m --pretty=tformat:%s path >log && + grep "^[A-Z]: " log | sort >actual && + cat >expect <<-\EOF && + A: add path0 + B: modify path0 on upper + C: modify path0 on lower + M: merge with rename to path + M: merge with rename to path + X: rename path0 to path1 + Y: rename path0 to path2 + Z: modify path + EOF + test_cmp expect actual +' + # Build a merge that takes the renamed path from the second parent, while the # first parent only has the old path. $2 decides which side is committed first, # which decides the walk order. -- 2.56.0
Technical Details
Message-ID:
<cover.1792701579.git.vmiklos@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-72892-linux-kernel-git=dewy.ruReferences:
<atW0ctTe-lNq08A-@collabora.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-72892-linux-kernel-git=dewy.ru From: vmiklos@collabora.com (Miklos Vajna) Newsgroups: linux.kernel.git Subject: [PATCH v3 0/4] log: speed up --follow following renames for non-linear history Date: Thu, 22 Oct 2026 22:45:19 +0200 Organization: Usenet Network Message-ID: <cover.1792701579.git.vmiklos@collabora.com> References: <atW0ctTe-lNq08A-@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Injection-Info: usenet.network; logging-data="327758"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:vCaijsX/YjRXGWeyw+HiyzhdaLs= sha256:orV3E5oM8SKNv/efbb8pk4IH4I2kILbPYf8PQSpVq+Y= sha1:9RFi6rggwjiHvQKaFkOKe1S8Nmo= sha256:q6kQpqog2Q6gY5VWsMkwh2IF6iI219rwC4LboG3lK8w= 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 38915111370; Thu, 22 Oct 2026 23:47:05 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.05 X-Spam-Status: No, score=-3.05 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, HEADER_FROM_DIFFERENT_DOMAINS=0.25, 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=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 pzXNWmVgy5Mt; Thu, 22 Oct 2026 23:46:57 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=git+bounces-72892-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 60F3C111148; Thu, 22 Oct 2026 23:46:48 +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 5A0EE3791D; Thu, 22 Oct 2026 20:45:38 +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=1792701938; b=etsO4odiMoYbD7x9gGRVQ2w8eOxPEnkWLRpbGfeTxhPxTpsyEMUp5qH6zve8b88/e1eX xsdYyaED1pgXYqjyLev28zZB7ZsAygdzT51JDXWJ9afzOL6S24Q21O9nWx1vSpUttIleS yxidIVVsaipz+Qs9fQlTBQfAVE2clMM5X4RnXTioztjah1ZhHZX3Io02HvfF/HDiULYYe iYEXGRTK8k1Es7aYoUlo+M3gYO/DsdMh5yDdmMrcccTwPBcIuTtCIHCcckxJ949LXWuRt UPBeb3zm8d5AD2fbWmfNoHI2EyrRTPOjkT7kFyZxvaq+/5S3K8rkveKqFd9lDK2s+6w== X-ARC-Message-Signature: i=3; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792701938; 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=hbxPyRGszq12hOs55lwihU4JWHw8VP+gegTqvCUw6t0=; b=pdmjNfT8KWwglZagKdf+bSmHjARNbBmQ3+c0inGcwMFYNLrNwNilWAVuCspD8NwI14Oc qz3eCJibb1D4DlUkIGdWjUCQYbIBBQp3RF6JtclnzbSYyvyuoePB7hyUryznsGgGaDwha +l+XnvUQMRXpiEpRsZKwMepIi68v5pvbfuV2SzdM89tm3sRlouKYQrVHH6moAi0M0BCK/ FdghnqS0iFiLstCsUFXZ8DxCTho1zEeuJmzpE1gPvvCDvtfK/W6LbtYsMgC3CzgGi0A1K pMwChp9dArDI2tS6a9ueQwIKoykW1O0vJONBX+DnvwDT05G53N3vwkcSKKhBT5VdPwg== X-ARC-Authentication-Results: i=3; smtp.subspace.kernel.org; dkim=pass header.d=collabora.com header.i=vmiklos@collabora.com header.a=rsa-sha256 header.s=zohomail header.b=KHT808S1; 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 3027F606A321; Thu, 22 Oct 2026 20:45:38 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=collabora.com header.i=vmiklos@collabora.com header.a=rsa-sha256 header.s=zohomail header.b=KHT808S1 X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=165.173.182.106 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1792701937; b=IhSIbhTfKomZMsqXqFr0IC6EXEfL2DsWLCbEFqOogCtywC52ah52JwAW35sQ86h+tBvC VWfGUQx5blAu1Kte8mp4U6ExifNOKCkNP4f/VKiZQ70wbiYbOhD82RFAK5/NnugE2u/Io ImkdqGN1nslcPK45mT1qVnBN1zTPHNRuwge2LCRif/H5O+maXmyb1Zefuj1gvO1fQzJc1 Ih7/pMaLY+H6uE4cfubSeMDZ1HcqesbwErwX3iFlcaoxr8SOYbSyE37aIlA/UXUWGjQod MYb79/ficZX1eIAGaraknO/IUWZKVsoBO/vBKXVDc5tAjdYQVUkSyRd5BtlcdqPO39Q== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792701937; 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=hbxPyRGszq12hOs55lwihU4JWHw8VP+gegTqvCUw6t0=; b=zVFcDjRjsGArHk+o4J3xtxhCFkH3gWAcmbWkrrx75W/CM3u+va2E7s83JF3392Ig03L2 +7LFANFmRXJHWQ55CVJtdfTl2roy9+sl1+M/Ii8OXw5IrWOPW2rjRWXVh12ZMvnwt6gKk EtbybW6w2sBzHzLK2CtMwB6OG1Zja8v07c5So9JD6tTDkXrmwg+sec/sng1cWGyCsZcDl 3XxGkWWk9Vp3lbweOksy71biS2fax+s5CQVdReHQy9eh7Wp6e2p35Rx58wDhTuHFtdb28 SG+l/tdJ8lk81X12QI0DXOodZSsbTkCQ0+AF9/cuholwzvm1vEl7PSaDtRnGk4YWJPA== 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=vmiklos@collabora.com header.a=rsa-sha256 header.s=zohomail header.b=KHT808S1; arc=pass header.oldest-pass=0 smtp.remote-ip=165.173.182.106 X-Received: from sender5-pp-e106.zoho.com (sender5-pp-e106.zoho.com [165.173.182.106]) (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 CD872606A319 for <git@vger.kernel.org>; Thu, 22 Oct 2026 20:45:36 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org CD872606A319 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=1792701928; cv=none; d=zohomail.com; s=zohoarc; b=MCunvWKWv4gTc+4muFSeuJxoii7aaO+8Hjjo08HAJ8RB0jPHNq/g7DjjgZ3+Mq4vBioksmCk5amZ9j1PKOj2XaN/qCogmXLnnAJCVcOWqnl1FhQsQvpdafGExCmxXf2Iqwk73G9lCihqJhquEpp48pofl2MmjZz7Rt1TUjO0BLA= X-ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792701928; 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=hbxPyRGszq12hOs55lwihU4JWHw8VP+gegTqvCUw6t0=; b=aB+xlTZ2tGiWWxlv2Yz4IyCHlJ9Y8IrqzY0HTaBYRgYuCWKWCASr3takHW3Ieaew8Cnub74Wc8qHoCjHtWLV3g3uonw4nSxFwJ+DYIc3n+yHTs+CimJXc5/VjVHrXOj5a3BG9zGWnYuijkFcHG5Dn3vFjiaO1gBlFLSWbdoSI9I= 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: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1792701928; s=zohomail; d=collabora.com; i=vmiklos@collabora.com; h=Date:Date:From:From:To:To:Cc:Cc:Subject:Subject:Message-ID:MIME-Version:Content-Type:In-Reply-To:Message-Id:Reply-To; bh=hbxPyRGszq12hOs55lwihU4JWHw8VP+gegTqvCUw6t0=; b=KHT808S1nmWvD7Im351m5c3KbKB87MuqW5YooRoRxVgSCmK1HNHNFRRwGKlvAMnk MxSz8XQpvDhpfEOIP9QFirJhfmSbor/nEo1iNSjH0Tzynw+xsNJIwI8F4rCraQiV0xa lxU6lIKPSTKdBJGXDkZKTvX7qd0wDQ2tSkNmrRqI= X-Received: by smtp.zohomail.com with SMTPS id 1792701925667659.2231402033653; Thu, 22 Oct 2026 13:45:25 -0700 (PDT) X-Cc: szeder.dev@gmail.com, ps@pks.im, 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: <atW0ctTe-lNq08A-@collabora.com> X-Zoho-Virus-Status: 1 X-Zoho-AV-Stamp: zmail-av-0.2.13.1.5.4/292.682.56 X-ZohoMailClient: External