This avoids some runtime penalties associated with recompiling
a regexp based on a constant local variable.
}
} 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;
}