about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-05-28 00:07:53 +0000
committerEric Wong <e@80x24.org>2021-05-28 03:46:34 +0000
commit7957be919f9fcf2c1dd9a2c0c1cc1e775de1ff52 (patch)
tree7f2d2f3cbe94d4cdf9464243e4c20bf8e928b5d2
parent2bc155b455048b127e5ae883a0e5a9964ef437ae (diff)
downloadpublic-inbox-7957be919f9fcf2c1dd9a2c0c1cc1e775de1ff52.tar.gz
Perl 5 doesn't warn on this, yet, but it warns on unescaped
'(' and ')' nowadays, so it's conceivable Perl could start
warning on this in the future.  So future-proof our code and
reduce reader confusion.
-rw-r--r--lib/PublicInbox/ViewDiff.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/ViewDiff.pm b/lib/PublicInbox/ViewDiff.pm
index 05acc242..f492b697 100644
--- a/lib/PublicInbox/ViewDiff.pm
+++ b/lib/PublicInbox/ViewDiff.pm
@@ -77,7 +77,7 @@ sub anchor0 ($$$$) {
         # which works well in practice. If projects put "=>", or trailing
         # spaces in filenames, oh well :P
         $fn =~ s/$DIFFSTAT_COMMENT//;
-        $fn =~ s/{(?:.+) => (.+)}/$1/ or $fn =~ s/.* => (.+)/$1/;
+        $fn =~ s/\{(?:.+) => (.+)\}/$1/ or $fn =~ s/.* => (.+)/$1/;
         $fn = git_unquote($fn);
 
         # long filenames will require us to check in anchor1()