changeset 16292:a1210916671b

gitlog-to-changelog: don't use "no_"-prefixed variable name * build-aux/gitlog-to-changelog (main): Use getopt's "!" attribute to enable both --cluster and --no-cluster. Change variable name, s/\$no_cluster/$cluster/, and reverse usage to match.
author Jim Meyering <meyering@redhat.com>
date Wed, 18 Jan 2012 08:53:23 +0100
parents 6763bb0fe8ab
children 8324ed8b219e
files ChangeLog build-aux/gitlog-to-changelog
diffstat 2 files changed, 9 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2012-01-18  Jim Meyering  <meyering@redhat.com>
 
+	gitlog-to-changelog: don't use "no_"-prefixed variable name
+	* build-aux/gitlog-to-changelog (main): Use getopt's "!" attribute
+	to enable both --cluster and --no-cluster.  Change variable name,
+	s/\$no_cluster/$cluster/, and reverse usage to match.
+
 	gitlog-to-changelog: use "||", not "or" in expressions
 	* build-aux/gitlog-to-changelog (main): Use "||", not "or" in
 	expressions.
--- a/build-aux/gitlog-to-changelog
+++ b/build-aux/gitlog-to-changelog
@@ -3,7 +3,7 @@
     if 0;
 # Convert git log output to ChangeLog format.
 
-my $VERSION = '2012-01-18 07:44'; # UTC
+my $VERSION = '2012-01-18 07:50'; # 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
@@ -194,7 +194,7 @@
   my $format_string = '%s%n%b%n';
   my $amend_file;
   my $append_dot = 0;
-  my $no_cluster = 0;
+  my $cluster = 1;
   GetOptions
     (
      help => sub { usage 0 },
@@ -203,7 +203,7 @@
      'format=s' => \$format_string,
      'amend=s' => \$amend_file,
      'append-dot' => \$append_dot,
-     'no-cluster' => \$no_cluster,
+     'cluster!' => \$cluster,
     ) or usage 1;
 
 
@@ -312,7 +312,7 @@
       # would be different from the previous date/name/email/coauthors header,
       # or if this or the previous entry consists of two or more paragraphs,
       # then print the header.
-      if ($no_cluster
+      if ( ! $cluster
           || $date_line ne $prev_date_line
           || "@coauthors" ne "@prev_coauthors"
           || $multi_paragraph