[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/2] gitlog-to-changelog: support 'tiny change' commits.
From: |
Gary V. Vaughan |
Subject: |
[PATCH 2/2] gitlog-to-changelog: support 'tiny change' commits. |
Date: |
Tue, 1 Nov 2011 19:22:23 +0700 |
Here is another patch to solve a similar issue with ChangeLog `tiny change'
annotations, by interpreting a 'Copyright-paperwork-required: No' line in
the git log message to mean that the ChangeLog output requires the `tiny
change' annotation.
Because the annotation is added to the date_line, there is no suppression
of consecutive header blocks when all else is equal but for a difference in
the annotation.
Okay to push?
The FSF insist that all non-trivial patches to its projects are
accompanied by appropriate paperwork, or that any patches that are
applied without that paperwork are marked as such in the
ChangeLog.
* gitlog-to-changelog: Convert `Copyright-paperwork-required: No'
lines from the git log message to standard `(tiny change)'
ChangeLog annotation.
---
ChangeLog | 9 +++++++++
build-aux/gitlog-to-changelog | 10 ++++++++--
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index f370be6..d59d9f9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2011-11-01 Gary V. Vaughan <address@hidden>
+ gitlog-to-changelog: support `tiny change' commits.
+ The FSF insist that all non-trivial patches to its projects are
+ accompanied by appropriate paperwork, or that any patches that are
+ applied without that paperwork are marked as such in the
+ ChangeLog.
+ * gitlog-to-changelog: Convert `Copyright-paperwork-required: No'
+ lines from the git log message to standard `(tiny change)'
+ ChangeLog annotation.
+
gitlog-to-changelog: support multi-author commits.
The FSF cares about keeping track of all authors of patches to its
projects, but Git doesn't provide obvious support for multi-author
diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelog
index 67d36af..324d708 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-11-01 11:50'; # UTC
+my $VERSION = '2011-11-01 11:52'; # 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
@@ -148,6 +148,11 @@ sub quoted_cmd(@)
my $date_line = sprintf "%s $2\n", strftime ("%F", localtime ($1));
+ # Format 'Copyright-paperwork-required: No' as a standard ChangeLog
+ # `(tiny change)' annotation.
+ my $tiny_change = grep /^Copyright-paperwork-required:\s+[Nn]o$/, @line;
+ $date_line =~ s/$/ (tiny change)/ if $tiny_change;
+
# Format 'Co-authored-by: A U Thor <address@hidden>' lines in
# standard multi-author ChangeLog format.
my @coauthors = grep /^Co-authored-by:.*>$/, @line;
@@ -167,8 +172,9 @@ sub quoted_cmd(@)
$prev_date_line = $date_line;
@prev_coauthors = @coauthors;
- # Omit "Co-authored-by..." and "Signed-off-by..." lines.
+ # Omit meta-data lines we've already interpreted.
@line = grep !/^(Co-authored|Signed-off)-by: .*>$/, @line;
+ @line = grep !/^Copyright-paperwork-required: /, @line;
# Remove leading and trailing blank lines.
while ($line[0] =~ /^\s*$/) { shift @line; }
--
1.7.7.1
Cheers,
--
Gary V. Vaughan (gary AT gnu DOT org)
- [PATCH 2/2] gitlog-to-changelog: support 'tiny change' commits.,
Gary V. Vaughan <=
- Re: [PATCH 2/2] gitlog-to-changelog: support 'tiny change' commits., Jim Meyering, 2011/11/01
- Re: [PATCH 2/2] gitlog-to-changelog: support 'tiny change' commits., Gary V. Vaughan, 2011/11/01
- Re: [PATCH 2/2] gitlog-to-changelog: support 'tiny change' commits., Jim Meyering, 2011/11/01
- Re: [PATCH 2/2] gitlog-to-changelog: support 'tiny change' commits., Gary V. Vaughan, 2011/11/09
- Re: [PATCH 2/2] gitlog-to-changelog: support 'tiny change' commits., Karl Berry, 2011/11/09
- Re: [PATCH 2/2] gitlog-to-changelog: support 'tiny change' commits., Gary V. Vaughan, 2011/11/09
- Re: [PATCH 2/2] gitlog-to-changelog: support 'tiny change' commits., Karl Berry, 2011/11/10
- Re: [PATCH 2/2] gitlog-to-changelog: support 'tiny change' commits., Gary V. Vaughan, 2011/11/15
- Re: [PATCH 2/2] gitlog-to-changelog: support 'tiny change' commits., Jim Meyering, 2011/11/15
- Re: [PATCH 2/2] gitlog-to-changelog: support 'tiny change' commits., Gary V. Vaughan, 2011/11/15