bug-gnulib
[Top][All Lists]
Advanced

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

[PATCH] gitlog-to-changelog: remove a little duplication


From: Jim Meyering
Subject: [PATCH] gitlog-to-changelog: remove a little duplication
Date: Fri, 30 Dec 2011 15:54:46 +0100

FYI,

>From 1a6249781ca11e2f16b04a6a1a5ddb9eee2c9ee7 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Fri, 30 Dec 2011 15:53:33 +0100
Subject: [PATCH] gitlog-to-changelog: remove a little duplication

* build-aux/gitlog-to-changelog (main): Grep @lines once,
rather than twice.
---
 ChangeLog                     |    6 ++++++
 build-aux/gitlog-to-changelog |    7 ++++---
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index fe96966..e61be47 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-12-30  Jim Meyering  <address@hidden>
+
+       gitlog-to-changelog: remove a little duplication
+       * build-aux/gitlog-to-changelog (main): Grep @lines once,
+       rather than twice.
+
 2011-12-29  Pádraig Brady  <address@hidden>

        canonicalize: add support for not resolving symlinks
diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelog
index ee1ac87..8d6bc7b 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-24 18:51'; # UTC
+my $VERSION = '2011-12-30 14:31'; # 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
@@ -253,8 +253,9 @@ sub parse_amend_file($)

       my @coauthors = grep /^Co-authored-by:.*$/, @line;
       # Omit "Co-authored-by..." and "Signed-off-by..." lines.
-      @line = grep !/^Signed-off-by: .*>$/, @line;
-      @line = grep !/^Co-authored-by: /, @line;
+      @line = grep !/^(?:Signed-off-by:[ ].*>$
+                       |Co-authored-by:[ ]
+                       )/x, @line;

       # Remove leading and trailing blank lines.
       if (@line)
--
1.7.8.1.391.g2c2ad



reply via email to

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