From: Eric Wong Date: Wed, 6 May 2020 10:40:53 +0000 (+0000) Subject: viewdiff: assume diffstat and diff order are identical X-Git-Tag: v1.5.0~25 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=65b37aeb8392a62e9aa8ceac08227c77c6fa6b8b;hp=65b37aeb8392a62e9aa8ceac08227c77c6fa6b8b;p=public-inbox.git viewdiff: assume diffstat and diff order are identical For non-malicious messages, we can assume the diffstat and actual diff appear in the same order. Thus we can store {-long_paths} as an arrayref and only compare the first element when we encounter a truncated path. This should make HTML rendering stable when there's basename conflicts in message such as https://lore.kernel.org/backports/1393202754-12919-13-git-send-email-hauke@hauke-m.de/ This diffstat anchor linkification can still be defeated by users who make actual path names beginning with "...", but we won't waste CPU cycles on it, either. ---