From: Miklos Vajna Date: Thu, 22 Oct 2026 20:45:19 GMT Subject: [PATCH v3 0/4] log: speed up --follow following renames for non-linear history Message-ID: In-Reply-To: Hi Junio, On Mon, Oct 19, 2026 at 08:11:05AM +0200, Miklos Vajna 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