]> Savannah Git Hosting - gnulib.git/commitdiff
gitlog-to-changelog: suppress ignored chatter
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 22 Mar 2016 21:56:35 +0000 (14:56 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 22 Mar 2016 21:57:00 +0000 (14:57 -0700)
* build-aux/gitlog-to-changelog: Do not warn about skipping
an SHA if it would have been ignored anyway.

ChangeLog
build-aux/gitlog-to-changelog

index e2be308c1fe0db04d0512421425573d1e3ce6d88..74e0906f93dcd1d81efbad54662739698b87453e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-03-22  Paul Eggert  <eggert@cs.ucla.edu>
+
+       gitlog-to-changelog: suppress ignored chatter
+       * build-aux/gitlog-to-changelog: Do not warn about skipping
+       an SHA if it would have been ignored anyway.
+
 2016-03-22  Geert Janssens  <janssens-geert@telenet.be>
 
        setlocale: add "sv" to Windows language table
index a2513d0efc702b4bc4ee149dc278027d935d3052..83bafdffa6fa0aa0fef5ed8f0f38b37a7bb93ea3 100755 (executable)
@@ -3,7 +3,7 @@ eval '(exit $?0)' && eval 'exec perl -wS "$0" "$@"'
     if 0;
 # Convert git log output to ChangeLog format.
 
-my $VERSION = '2016-01-12 23:09'; # UTC
+my $VERSION = '2016-03-22 21:49'; # 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
@@ -298,9 +298,7 @@ sub git_dir_option($)
             {
               if ($sha =~ /^$_/)
                 {
-                  $skipflag = 1;
-                  ## Perhaps only warn if a pattern matches more than once?
-                  warn "$ME: warning: skipping $sha due to $_\n";
+                  $skipflag = $_;
                   last;
                 }
             }
@@ -386,8 +384,17 @@ sub git_dir_option($)
       }
 
       # Ignore commits that match the --ignore-matching pattern, if specified.
-      if (! ($skipflag || (defined $ignore_matching
-             && @line && $line[0] =~ /$ignore_matching/)))
+      if (defined $ignore_matching && @line && $line[0] =~ /$ignore_matching/)
+        {
+          $skipflag = 1;
+        }
+      elsif ($skipflag)
+        {
+          ## Perhaps only warn if a pattern matches more than once?
+          warn "$ME: warning: skipping $sha due to $skipflag\n";
+        }
+
+      if (! $skipflag)
         {
           if (defined $ignore_line && @line)
             {