my (%headercount, @headercache);
while (readline) {
- s/(.+)\n//m;
+ s/^([0-9a-f]{4,40})\n//m and
my $hash = $1;
# strip commit seperator
next BLOCK if not @headers;
if ($opt{debug} and $prefix) {
- say "infix junk in commit $hash";
+ say sprintf ': invalid lines in %s (%s)', $hash // 'block', $prefix;
}
for (@headers) {
my $line = $_->[2] // join(': ', @$_);
+ $line =~ s/^/$hash / if defined $hash;
+
if (defined $opt{min} or $opt{max}) {
my $counter = \$headercount{ $_->[0] }->{ $_->[1] // '' };
my $excess = $$counter++ - ($opt{min} // 0);