1
0
mirror of git://git.gnupg.org/gnupg.git synced 2025-01-03 12:11:33 +01:00

Do not copy default merge commit log entries into the ChangeLog.

* scripts/gitlog-to-changelog: Skip merge commits.
This commit is contained in:
Werner Koch 2012-01-20 11:08:06 +01:00
parent 561d89803b
commit 51c1e84265

View File

@ -3,7 +3,7 @@ eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}'
if 0; if 0;
# Convert git log output to ChangeLog format. # Convert git log output to ChangeLog format.
my $VERSION = '2011-11-02 07:53'; # UTC my $VERSION = '2012-01-20 10:14'; # UTC
# The definition above must lie within the first 8 lines in order # The definition above must lie within the first 8 lines in order
# for the Emacs time-stamp write hook (at end) to update it. # for the Emacs time-stamp write hook (at end) to update it.
# If you change this file with Emacs, please let the write hook # If you change this file with Emacs, please let the write hook
@ -204,6 +204,7 @@ sub parse_amend_file($)
my $prev_date_line = ''; my $prev_date_line = '';
my @prev_coauthors = (); my @prev_coauthors = ();
while (1) while (1)
{ {
defined (my $in = <PIPE>) defined (my $in = <PIPE>)
@ -217,6 +218,10 @@ sub parse_amend_file($)
$n_read == $log_nbytes $n_read == $log_nbytes
or die "$ME:$.: unexpected EOF\n"; or die "$ME:$.: unexpected EOF\n";
# Skip log entries with the default merge commit message.
$log =~ /^.*\n\nMerge branch '.*\n\s*/
and goto SKIPCOMMIT;
# Extract leading hash. # Extract leading hash.
my ($sha, $rest) = split ':', $log, 2; my ($sha, $rest) = split ':', $log, 2;
defined $sha defined $sha
@ -328,6 +333,7 @@ sub parse_amend_file($)
print "\n", join ("\n", @line), "\n"; print "\n", join ("\n", @line), "\n";
} }
SKIPCOMMIT:
defined ($in = <PIPE>) defined ($in = <PIPE>)
or last; or last;
$in ne "\n" $in ne "\n"