[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/2] gitlog-to-changelog: remove duplicates without warning messa
From: |
Gary V. Vaughan |
Subject: |
[PATCH 2/2] gitlog-to-changelog: remove duplicates without warning messages. |
Date: |
Thu, 3 Jan 2013 20:23:30 +0700 |
From: "Gary V. Vaughan" <address@hidden>
Now, when the new 'Omit-from-ChangeLog: Yes' tag is found in a commit
log entry, after git-log-fix edits have been applied, don't output
anything into the ChangeLog for that entry.
* bulid-aux/gitlog-to-changelog: Omit-from-ChangeLog is
a new log entry tag to skip legitimate log duplicates, without
emitting a noisy 'empty commit message' warning.
---
build-aux/gitlog-to-changelog | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelog
index 5261081..aeae458 100755
--- a/build-aux/gitlog-to-changelog
+++ b/build-aux/gitlog-to-changelog
@@ -99,6 +99,8 @@ at the beginning of a log message line. They are not copied
to the output.
Co-authored-by: Joe User <address@hidden>
List the specified name and email address on a second
ChangeLog header, denoting a co-author.
+ Omit-from-ChangeLog: Yes
+ No ChangeLog entry is made for this commit.
Signed-off-by: Joe User <address@hidden>
These lines are simply elided.
@@ -323,10 +325,14 @@ sub git_dir_option($)
strftime ("%F", localtime ($1)), $2;
my @coauthors = grep /^Co-authored-by:.*$/, @line;
+
+ my $omit = grep /^Omit-from-ChangeLog:\s+[Yy]es$/, @line;
+
# Omit meta-data lines we've already interpreted.
@line = grep !/^(?:Signed-off-by:[ ].*>$
|Co-authored-by:[ ]
|Copyright-paperwork-exempt:[ ]
+ |Omit-from-ChangeLog:[ ]
)/x, @line;
# Remove leading and trailing blank lines.
@@ -356,7 +362,7 @@ sub git_dir_option($)
{
warn "$ME: warning: empty commit message:\n $date_line\n";
}
- else
+ elsif ( ! $omit )
{
# If clustering of commit messages has been disabled, if this header
# would be different from the previous date/name/email/coauthors
header,
--
1.8.0.2