gitlog-to-changelog: Copyright-paperwork-exempt: yes == (tiny change)
authorGary V. Vaughan <gary@gnu.org>
Fri, 30 Dec 2011 17:47:55 +0000 (18:47 +0100)
committerJim Meyering <meyering@redhat.com>
Mon, 2 Jan 2012 09:44:13 +0000 (10:44 +0100)
* build-aux/gitlog-to-changelog (main): Map the string, at beginning
of line in a git commit log, "Copyright-paperwork-exempt: yes", to
the "  (tiny change)" notation that is appended to the standard
ChangeLog "date  name  email" header line.

ChangeLog
build-aux/gitlog-to-changelog

index ccc923b..9624612 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-12-30  Gary V. Vaughan  <gary@gnu.org>
+
+       gitlog-to-changelog: Copyright-paperwork-exempt: yes == (tiny change)
+       * build-aux/gitlog-to-changelog (main): Map the string, at beginning
+       of line in a git commit log, "Copyright-paperwork-exempt: yes", to
+       the "  (tiny change)" notation that is appended to the standard
+       ChangeLog "date  name  email" header line.
+
 2012-01-01  Jim Meyering  <meyering@redhat.com>
 
        test-framework-sh: init.sh: fix "make dist" failure
index 6fb37cd..3142cca 100755 (executable)
@@ -3,7 +3,7 @@ eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}'
     if 0;
 # Convert git log output to ChangeLog format.
 
-my $VERSION = '2011-12-30 14:31'; # UTC
+my $VERSION = '2011-12-30 17:43'; # 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
@@ -249,12 +249,20 @@ sub parse_amend_file($)
       $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));
+
+      # Format 'Copyright-paperwork-exempt: Yes' as a standard ChangeLog
+      # `(tiny change)' annotation.
+      my $tiny = (grep (/^Copyright-paperwork-exempt:\s+[Yy]es$/, @line)
+                  ? '  (tiny change)' : '');
+
+      my $date_line = sprintf "%s  $2$tiny\n",
+        strftime ("%F", localtime ($1));
 
       my @coauthors = grep /^Co-authored-by:.*$/, @line;
-      # Omit "Co-authored-by..." and "Signed-off-by..." lines.
+      # Omit meta-data lines we've already interpreted.
       @line = grep !/^(?:Signed-off-by:[ ].*>$
                        |Co-authored-by:[ ]
+                       |Copyright-paperwork-exempt:[ ]
                        )/x, @line;
 
       # Remove leading and trailing blank lines.