From bbfa42a9ea55b7057c7a6b632f090763c9e7c655 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 4 Jun 2019 08:30:55 +0000 Subject: solver|viewdiff: restrict digit matches to ASCII git would not generate non-ASCII digits to describe hunk offsets, so don't waste more time than necessary to make sense of non-ASCII digit chars for line offsets. --- lib/PublicInbox/SolverGit.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/PublicInbox/SolverGit.pm') diff --git a/lib/PublicInbox/SolverGit.pm b/lib/PublicInbox/SolverGit.pm index 3841c567..81f99025 100644 --- a/lib/PublicInbox/SolverGit.pm +++ b/lib/PublicInbox/SolverGit.pm @@ -206,7 +206,7 @@ sub find_extract_diff ($$$) { } my $msgs = $srch->query($q, { relevance => 1 }); - my $re = qr/\Aindex ($pre[a-f0-9]*)\.\.($post[a-f0-9]*)(?: (\d+))?/; + my $re = qr/\Aindex ($pre[a-f0-9]*)\.\.($post[a-f0-9]*)(?: ([0-9]+))?/; my $di; foreach my $smsg (@$msgs) { -- cgit v1.2.3-24-ge0c7