diff options
author | Jim Meyering <meyering@redhat.com> | 2011-12-30 15:53:33 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2011-12-30 15:54:06 +0100 |
commit | 1a6249781ca11e2f16b04a6a1a5ddb9eee2c9ee7 (patch) | |
tree | dc000ab54b1942a96a0fea39acb5d7cb56510582 /build-aux/gitlog-to-changelog | |
parent | 8bcd0399386f6c3298ee63da74c58f80053d5a42 (diff) | |
download | gnulib-1a6249781ca11e2f16b04a6a1a5ddb9eee2c9ee7.tar.gz |
gitlog-to-changelog: remove a little duplication
* build-aux/gitlog-to-changelog (main): Grep @lines once,
rather than twice.
Diffstat (limited to 'build-aux/gitlog-to-changelog')
-rwxr-xr-x | build-aux/gitlog-to-changelog | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelog index ee1ac87a67..8d6bc7b701 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) |