Re: [PATCH v4 5/6] log: speed up --follow following renames for non-linear history
- From
Miklos Vajna <vmiklos@collabora.com>
- Date
- Nov 9, 2026, 08:02 UTC
- Message-ID
- <avF-HwjximDD54P_@collabora.com>
- In-Reply-To
- <au3gswJZzhutGlpR@pks.im>
Hi Patrick,
On Fri, Nov 06, 2026 at 03:14:11PM +0100, Patrick Steinhardt <ps@pks.im> wrote:
Show 5 quoted lines
> 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