Newer autoconf adds PACKAGE_URL definition.
[virt-top.git] / gitlog-to-changelog
index a0f8a08..cf0fef0 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/perl
 # Convert git log output to ChangeLog format.
 
-my $VERSION = '2009-08-12 16:49'; # UTC
+my $VERSION = '2009-10-05 15:04'; # UTC
 # The definition above must lie within the first 8 lines in order
 # for the Emacs time-stamp write hook (at end) to update it.
 # If you change this file with Emacs, please let the write hook
@@ -132,20 +132,18 @@ sub quoted_cmd(@)
       my $author_line = shift @line;
       defined $author_line
         or die "$ME:$.: unexpected EOF\n";
-      $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;
+      }
 
       # Omit "Signed-off-by..." lines.
       @line = grep !/^Signed-off-by: .*>$/, @line;
@@ -153,7 +151,7 @@ sub quoted_cmd(@)
       # If there were any lines
       if (@line == 0)
         {
-          warn "$ME: warning: empty commit message:\n  $date_line\n";
+          warn "$ME: warning: empty commit message:\n  $prev_date_line\n";
         }
       else
         {