diff options
author | Eric Wong <e@80x24.org> | 2015-07-06 21:22:22 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2015-07-06 21:22:46 +0000 |
commit | 49338dea67712c0106c09d871fca7d680c32298f (patch) | |
tree | 6d7ddee63ab7a00e5700137aeeb920cf3e225722 /lib | |
parent | ba91cef345da64ecda294f8f60b70b7de73ea1ec (diff) | |
download | public-inbox-49338dea67712c0106c09d871fca7d680c32298f.tar.gz |
This avoids some runtime penalties associated with recompiling a regexp based on a constant local variable.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/PublicInbox/Feed.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/Feed.pm b/lib/PublicInbox/Feed.pm index dd991532..3c0ec86d 100644 --- a/lib/PublicInbox/Feed.pm +++ b/lib/PublicInbox/Feed.pm @@ -168,14 +168,14 @@ sub each_recent_blob { } } elsif ($line =~ /$delmsg/o) { $deleted{$1} = 1; - } elsif ($line =~ /^commit (${hex}{7,40})/) { + } elsif ($line =~ /^commit (${hex}{7,40})/o) { push @commits, $1; } } if ($last) { while (my $line = <$log>) { - if ($line =~ /^commit (${hex}{7,40})/) { + if ($line =~ /^commit (${hex}{7,40})/o) { push @commits, $1; last; } |