[Pkg-gnupg-commit] [libassuan] 371/437: Update gitlog-to-changelog to support --tear-off.

Eric Dorland eric at moszumanska.debian.org
Fri May 22 05:34:05 UTC 2015


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository libassuan.

commit 132c70fe697346a1c9f75d51572835f6d4951b3b
Author: Werner Koch <wk at gnupg.org>
Date:   Tue Dec 20 11:24:35 2011 +0100

    Update gitlog-to-changelog to support --tear-off.
---
 Makefile.am                   |  4 ++--
 build-aux/gitlog-to-changelog | 15 +++++++++++++++
 2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index e7eeee5..3103c7d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,5 @@
 # Assuan top level Makefile
-# Copyright (C) 2001, 2002, 2003, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2007, 2011 Free Software Foundation, Inc.
 #
 # This file is part of Assuan.
 #
@@ -40,7 +40,7 @@ gen-ChangeLog:
 	if test -d $(top_srcdir)/.git; then				\
 	  (cd $(top_srcdir) &&                      			\
 	    ./build-aux/gitlog-to-changelog				\
-	    --amend=build-aux/git-log-fix				\
+	    --amend=build-aux/git-log-fix  --tear-off			\
 	    --since=$(gen_start_date) ) > $(distdir)/cl-t;		\
           cat $(top_srcdir)/build-aux/git-log-footer >> $(distdir)/cl-t;\
 	  rm -f $(distdir)/ChangeLog;					\
diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelog
index 40a8035..d9f594f 100755
--- a/build-aux/gitlog-to-changelog
+++ b/build-aux/gitlog-to-changelog
@@ -64,6 +64,7 @@ OPTIONS:
                   makes a change to SHA1's commit log text or metadata.
    --append-dot append a dot to the first line of each commit message if
                   there is no other punctuation or blank at the end.
+   --tear-off   tear off all commit log lines after a '--' line.
    --since=DATE convert only the logs since DATE;
                   the default is to convert all log entries.
    --format=FMT set format string for commit subject and body;
@@ -175,6 +176,7 @@ sub parse_amend_file($)
   my $format_string = '%s%n%b%n';
   my $amend_file;
   my $append_dot = 0;
+  my $tear_off = 0;
   GetOptions
     (
      help => sub { usage 0 },
@@ -183,6 +185,7 @@ sub parse_amend_file($)
      'format=s' => \$format_string,
      'amend=s' => \$amend_file,
      'append-dot' => \$append_dot,
+     'tear-off' => \$tear_off,
     ) or usage 1;
 
 
@@ -281,6 +284,18 @@ sub parse_amend_file($)
       @line = grep !/^Signed-off-by: .*>$/, @line;
       @line = grep !/^Co-authored-by: /, @line;
 
+      # Remove everything after a line with 2 dashes at the beginning.
+      if ($tear_off)
+        {
+           my @tmpline;
+           foreach (@line)
+             {
+	       last if /^--\s*$/;
+               push @tmpline,$_;
+             }
+           @line = @tmpline;
+        }
+
       # Remove leading and trailing blank lines.
       if (@line)
         {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/libassuan.git



More information about the Pkg-gnupg-commit mailing list