mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-09 10:39:02 -04:00
Only emit an email address into a copyright header if one exists.
This commit is contained in:
parent
e27c9a223b
commit
1578e1f3b0
@ -79,11 +79,16 @@ for my $path (@paths) {
|
||||
} elsif ($line =~ /^author (.+)/) {
|
||||
$commits{$commit}->{NAME} = $1;
|
||||
} elsif ($line =~ /^author-mail <(.+)>/) {
|
||||
next if $1 eq 'unknown@email.invalid';
|
||||
next if $1 =~ /\@users.noreply.github.com$/;
|
||||
$commits{$commit}->{EMAIL} = $1;
|
||||
} elsif ($line =~ /^author-time (.+)/) {
|
||||
$commits{$commit}->{YEAR} = strftime '%Y', gmtime $1;
|
||||
} elsif ($line =~ /^filename /) {
|
||||
my $display = sprintf "%s <%s>", $commits{$commit}->{NAME}, $commits{$commit}->{EMAIL};
|
||||
my $display = $commits{$commit}->{NAME};
|
||||
if (exists $commits{$commit}->{EMAIL}) {
|
||||
$display .= sprintf " <%s>", $commits{$commit}->{EMAIL};
|
||||
}
|
||||
$authors{$display} //= [];
|
||||
push @{$authors{$display}}, $commits{$commit}->{YEAR};
|
||||
my $details = `git rev-list --format=%B --max-count=1 $commit`;
|
||||
|
Loading…
x
Reference in New Issue
Block a user