Skip to content

Commit

Permalink
Use more context to detect real commits with heuristics in cvslog.
Browse files Browse the repository at this point in the history
  • Loading branch information
bluhm committed Sep 21, 2023
1 parent 7fb746d commit fb0ebae
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions cvslog.pl
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,17 @@
my $state = "header";
my $file;
my %commit;
while (<$cvs>) {
for ((local $_, my $preview) = (scalar <$cvs>, scalar <$cvs>);
defined($_);
($_, $preview) = ($preview, scalar <$cvs>)) {

print if $verbose;
chomp;
if ($_ eq $startcommit || $_ eq $finishcommit) {
# some commit messages contain ----------------------------
# use more context to detect real commits with heuristics
if (($_ eq $startcommit && $preview =~ /^revision 1\./) ||
$_ eq $finishcommit) {

$file or die "No file before commit: $_";
if ($state eq "header") {
my @keys = keys %commit;
Expand Down

0 comments on commit fb0ebae

Please sign in to comment.