Skip to content

Commit

Permalink
improved .mailmap and AUTHORS file logic
Browse files Browse the repository at this point in the history
This change updates AUTHORS with multiple missing contributors to the
project. It updates .mailmap so that the preferred email for each
developer matches what is in AUTHORS (sometimes changing the AUTHORS
entry, sometimes changes the .mailmap entry or entries to achieve this
goal. It also adds a new tool, Porting/UpdateAuthors.pl which can be
used to automatically update the relevant data.

The general idea is that if you run Porting/UpdateAuthors.pl any never
developers will be added to AUTHORS, and new entries will be added to
the .mailmap file. The aim is that the only data we need to have to
manage both files is the data in both files and the commit history
itself. There is NOT embedded special datasets in the tool.

The idea is that *every* developer, be it author or committer has at
least one entry in .mailmap, and that the vast majority of the email
data we have for commits is mapped to corresponding entry in the AUTHORS
file. Furthermore the .mailmap file is expected to have an entry for
every distinct email ever used by a developer on the project.

If you run Porting/UpdateAuthors.pl the tool will analyze all the
commits in the projects history, and update either or both the .mailmap
and AUTHORS file appropriately. If an existing developer adds a commit
which either has the same name or email as is listed already then it
will DTRT and update the .mailmap with the appropriate mappings. If a
new developer adds a commit then it will DTRT and update both the
.mailmap and the AUTHORS file with that developers details.

Every single existing distinct name/email combination has been added to
the mailmap, and matched to AUTHORS data. In some case where there was
conflicting or missing data I used an educated guess, contacted the
developer myself, or verified the email with the email provider. Eg.
gmail.com will helpfully resolve gmail email addresses to their name if
you simply type the email address into a new mail.
  • Loading branch information
demerphq committed Mar 2, 2022
1 parent 37fe1b2 commit 1ffa2d7
Show file tree
Hide file tree
Showing 7 changed files with 2,653 additions and 88 deletions.
2,016 changes: 1,938 additions & 78 deletions .mailmap

Large diffs are not rendered by default.

63 changes: 56 additions & 7 deletions AUTHORS

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions MANIFEST
Expand Up @@ -5478,6 +5478,7 @@ Porting/sync-with-cpan Sync with CPAN
Porting/timecheck.c Test program for the 2038 fix
Porting/timecheck2.c Test program for the 2038 fix
Porting/todo.pod Perl things to do
Porting/updateAUTHORS.pl Tool to automatically update AUTHORS and .mailmap from git log data
Porting/valgrindpp.pl Summarize valgrind reports
Porting/vote_admin_guide.pod Perlgov Vote Administrator guide
pp.c Push/Pop code
Expand Down
11 changes: 10 additions & 1 deletion Porting/README.pod
Expand Up @@ -44,7 +44,9 @@ Check source code for ANSI-C violations.

=head2 F<checkAUTHORS.pl>

Used by F<t/porting/authors.t> to ensure the F<AUTHORS> list is up to date.
Used by F<t/porting/authors.t> to ensure the F<AUTHORS> list is up to
date. See also L<< /"F<updateAUTHORS.pl>" >> for a way to automatically
fix issues found by this tool.

=head2 F<checkcfguse.pl>

Expand Down Expand Up @@ -381,6 +383,13 @@ to work on any of these, but it's a good idea to first contact
I<perl5-porters@perl.org> to avoid duplication of effort, and to learn from
any previous attempts.

=head2 F<updateAUTHORS.pl>

This script will automatically update AUTHORS and create .mailmap entries
based on the git commit log history. If F<checkAUTHORS.pl> complains
during testing you should run this. It will automatically fix most if not
all AUTHORS related test fails.

=head2 F<valgrindpp.pl>

A post-processor for C<make test.valgrind>. F<valgrindpp.pl> is a
Expand Down
10 changes: 8 additions & 2 deletions Porting/checkAUTHORS.pl
Expand Up @@ -517,8 +517,14 @@ sub display_test_output {
if ($authors->{$email}) {
print "ok $count - ".$real_names->{$email} ." $email\n";
} else {
print "not ok $count - Contributor not found in AUTHORS: $email ".($real_names->{$email} || '???' )."\n";
print STDERR ($real_names->{$email} || '???' )." <$email> not found in AUTHORS\n";
print "not ok $count - Contributor not found in AUTHORS:",
" $email ".($real_names->{$email} || '???' )."\n",
"# To fix try running Porting/updateAUTHORS.pl ",
"and then review and commit the result.\n";
print STDERR "# ", ($real_names->{$email} || '???' ), " <$email>",
" not found in AUTHORS.\n",
"# To fix try running Porting/updateAUTHORS.pl ",
"and then review and commit the result.\n";
}
}

Expand Down
1 change: 1 addition & 0 deletions Porting/exec-bit.txt
Expand Up @@ -66,6 +66,7 @@ Porting/newtests-perldelta.pl
Porting/perlhist_calculate.pl
Porting/sort_perldiag.pl
Porting/sync-with-cpan
Porting/updateAUTHORS.pl
Porting/valgrindpp.pl
Cross/generate_config_sh
Cross/warp

0 comments on commit 1ffa2d7

Please sign in to comment.