mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
gitlog-to-changelog: New option --tear-off.
* scripts/gitlog-to-changelog: Add option --tear-off. * Makefile.am (gen-ChangeLog): Use that option.
This commit is contained in:
parent
8a12a2000d
commit
ea0a21410b
@ -116,7 +116,7 @@ gen-ChangeLog:
|
|||||||
if test -d $(top_srcdir)/.git; then \
|
if test -d $(top_srcdir)/.git; then \
|
||||||
(cd $(top_srcdir) && \
|
(cd $(top_srcdir) && \
|
||||||
./scripts/gitlog-to-changelog \
|
./scripts/gitlog-to-changelog \
|
||||||
--append-dot \
|
--append-dot --tear-off \
|
||||||
--amend=scripts/git-log-fix \
|
--amend=scripts/git-log-fix \
|
||||||
--since=$(gen_start_date) ) > $(distdir)/cl-t; \
|
--since=$(gen_start_date) ) > $(distdir)/cl-t; \
|
||||||
cat $(top_srcdir)/scripts/git-log-footer >> $(distdir)/cl-t; \
|
cat $(top_srcdir)/scripts/git-log-footer >> $(distdir)/cl-t; \
|
||||||
|
@ -64,6 +64,7 @@ OPTIONS:
|
|||||||
makes a change to SHA1's commit log text or metadata.
|
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
|
--append-dot append a dot to the first line of each commit message if
|
||||||
there is no other punctuation or blank at the end.
|
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;
|
--since=DATE convert only the logs since DATE;
|
||||||
the default is to convert all log entries.
|
the default is to convert all log entries.
|
||||||
--format=FMT set format string for commit subject and body;
|
--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 $format_string = '%s%n%b%n';
|
||||||
my $amend_file;
|
my $amend_file;
|
||||||
my $append_dot = 0;
|
my $append_dot = 0;
|
||||||
|
my $tear_off = 0;
|
||||||
GetOptions
|
GetOptions
|
||||||
(
|
(
|
||||||
help => sub { usage 0 },
|
help => sub { usage 0 },
|
||||||
@ -183,6 +185,7 @@ sub parse_amend_file($)
|
|||||||
'format=s' => \$format_string,
|
'format=s' => \$format_string,
|
||||||
'amend=s' => \$amend_file,
|
'amend=s' => \$amend_file,
|
||||||
'append-dot' => \$append_dot,
|
'append-dot' => \$append_dot,
|
||||||
|
'tear-off' => \$tear_off,
|
||||||
) or usage 1;
|
) or usage 1;
|
||||||
|
|
||||||
|
|
||||||
@ -282,13 +285,16 @@ sub parse_amend_file($)
|
|||||||
@line = grep !/^Co-authored-by: /, @line;
|
@line = grep !/^Co-authored-by: /, @line;
|
||||||
|
|
||||||
# Remove everything after a line with 2 dashes at the beginning.
|
# Remove everything after a line with 2 dashes at the beginning.
|
||||||
my @tmpline;
|
if ($tear_off)
|
||||||
foreach (@line)
|
{
|
||||||
{
|
my @tmpline;
|
||||||
last if /^--\s*$/;
|
foreach (@line)
|
||||||
push @tmpline,$_;
|
{
|
||||||
|
last if /^--\s*$/;
|
||||||
|
push @tmpline,$_;
|
||||||
|
}
|
||||||
|
@line = @tmpline;
|
||||||
}
|
}
|
||||||
@line = @tmpline;
|
|
||||||
|
|
||||||
# Remove leading and trailing blank lines.
|
# Remove leading and trailing blank lines.
|
||||||
if (@line)
|
if (@line)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user