- $author_line =~ /^(\d+) (.*>)$/
- or die "$ME:$.: Invalid line "
- . "(expected date/author/email):\n$author_line\n";
-
- my $date_line = sprintf "%s $2\n", strftime ("%F", localtime ($1));
- # If this line would be the same as the previous date/name/email
- # line, then arrange not to print it.
- if ($date_line ne $prev_date_line)
- {
- $prev_date_line eq ''
- or print "\n";
- print $date_line;
- }
- $prev_date_line = $date_line;
+ if ($author_line =~ /^(\d+) (.*>)$/) {
+ my $date_line = sprintf "%s $2\n", strftime ("%F", localtime ($1));
+ # If this line would be the same as the previous date/name/email
+ # line, then arrange not to print it.
+ if ($date_line ne $prev_date_line)
+ {
+ $prev_date_line eq ''
+ or print "\n";
+ print $date_line;
+ }
+ $prev_date_line = $date_line;
+ }