changeset 16205:49f7527f743f

gitlog-to-changelog: don't malfunction when name contains %-directive * build-aux/gitlog-to-changelog (main): Don't let a %-directive in a name string cause trouble. E.g., with a user name of "%s", gitlog-to-changelog would fail with "Missing argument in sprintf at..."
author Jim Meyering <meyering@redhat.com>
date Fri, 30 Dec 2011 19:00:49 +0100
parents aca34cc63479
children 5534ceec1676
files ChangeLog build-aux/gitlog-to-changelog
diffstat 2 files changed, 10 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Dec 30 18:47:55 2011 +0100
+++ b/ChangeLog	Fri Dec 30 19:00:49 2011 +0100
@@ -1,3 +1,10 @@
+2011-12-30  Jim Meyering  <meyering@redhat.com>
+
+	gitlog-to-changelog: don't malfunction when name contains %-directive
+	* build-aux/gitlog-to-changelog (main): Don't let a %-directive
+	in a name string cause trouble.  E.g., with a user name of "%s",
+	gitlog-to-changelog would fail with "Missing argument in sprintf at..."
+
 2011-12-30  Gary V. Vaughan  <gary@gnu.org>
 
 	gitlog-to-changelog: Copyright-paperwork-exempt: yes == (tiny change)
--- a/build-aux/gitlog-to-changelog	Fri Dec 30 18:47:55 2011 +0100
+++ b/build-aux/gitlog-to-changelog	Fri Dec 30 19:00:49 2011 +0100
@@ -3,7 +3,7 @@
     if 0;
 # Convert git log output to ChangeLog format.
 
-my $VERSION = '2011-12-30 17:43'; # UTC
+my $VERSION = '2011-12-30 17:48'; # 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
@@ -255,8 +255,8 @@
       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 $date_line = sprintf "%s  %s$tiny\n",
+        strftime ("%F", localtime ($1)), $2;
 
       my @coauthors = grep /^Co-authored-by:.*$/, @line;
       # Omit meta-data lines we've already interpreted.