bug-gnulib
[Top][All Lists]
Advanced

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

[PATCH] gitlog-to-changelog: trim only trailing whitespaces


From: Pavel Raiskup
Subject: [PATCH] gitlog-to-changelog: trim only trailing whitespaces
Date: Thu, 24 Sep 2015 17:17:38 +0200

This is fix for --format regression introduced by commit
2b93079a5d1baa4d;  it caused that --format='%s%n%n%b%n' (see the
doubled %n string) had no effect anymore.  This format
specification has been used e.g. by GNU paxuitils (commit
edfd8bcc3).

* build-aux/gitlog-to-changelog (main): Stop squashing multiple
newlines in commmit messages.
---
 ChangeLog                     | 12 ++++++++++++
 build-aux/gitlog-to-changelog |  2 +-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 7eca2c4..81a5326 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2015-09-24  Pavel Raiskup  <address@hidden>
+
+       gitlog-to-changelog: trim only trailing whitespaces
+       This is fix for --format regression introduced by commit
+       2b93079a5d1baa4d;  it caused that --format='%s%n%n%b%n' (see the
+       doubled %n string) had no effect anymore.  This format
+       specification has been used e.g. by GNU paxuitils (commit
+       edfd8bcc3).
+
+       * build-aux/gitlog-to-changelog (main): Stop squashing multiple
+       newlines in commmit messages.
+
 2015-09-23  Paul Eggert  <address@hidden>
 
        Test that c_iscntrl agrees with iscntrl, etc.
diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelog
index 0cab1bf..a0e0a05 100755
--- a/build-aux/gitlog-to-changelog
+++ b/build-aux/gitlog-to-changelog
@@ -333,7 +333,7 @@ sub git_dir_option($)
           $rest =~ s/^\s*\(cherry picked from commit [\da-f]+\)\n//m;
         }
 
-      my @line = split /\s*\n/, $rest;
+      my @line = split /[ \t]*\n/, $rest;
       my $author_line = shift @line;
       defined $author_line
         or die "$ME:$.: unexpected EOF\n";
-- 
2.5.0




reply via email to

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