bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] gitlog-to-changelog: don't malfunction when name contains %-dire


From: Jim Meyering
Subject: [PATCH] gitlog-to-changelog: don't malfunction when name contains %-directive
Date: Fri, 30 Dec 2011 19:06:47 +0100

FYI, a minor bug fix:

>From e15863f1ee27315eaa63e83ad2c17d832d64b951 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Fri, 30 Dec 2011 19:00:49 +0100
Subject: [PATCH] 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..."
---
 ChangeLog                     |    7 +++++++
 build-aux/gitlog-to-changelog |    6 +++---
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 0e5f204..2e8ff4e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-12-30  Jim Meyering  <address@hidden>
+
+       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  <address@hidden>

        gitlog-to-changelog: Copyright-paperwork-exempt: yes == (tiny change)
diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelog
index 529d7be..a3b9fe3 100755
--- a/build-aux/gitlog-to-changelog
+++ b/build-aux/gitlog-to-changelog
@@ -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 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 @@ sub parse_amend_file($)
       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.
--
1.7.8.1.391.g2c2ad



reply via email to

[Prev in Thread] Current Thread [Next in Thread]