mailmap: add list of contributors

Since a number of contributors to DPDK have submitted patches to DPDK
under more than one email address, we should maintain a mailmap file
to properly track their commits using "shortlog",
and to do accurate automatic Cc with "get_maintainer.pl".

It also helps fix up any mangled names, for example, with
surname/firstname reversed, or with incorrect capitalization.
By keeping this file in the DPDK repository,
rather than committers maintaining their own copies,
it allows individual contributors to edit it
to update their own email address preferences if so desired.

While at it, update our checkpatches.sh script
and add some documentation to help new contributors.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
This commit is contained in:
Bruce Richardson 2022-11-25 15:54:00 +01:00 committed by Thomas Monjalon
parent cee226c934
commit e83d41f069
5 changed files with 1609 additions and 1 deletions

1571
.mailmap Normal file

File diff suppressed because it is too large Load Diff

View File

@ -103,6 +103,7 @@ F: devtools/libabigail.abignore
F: devtools/words-case.txt F: devtools/words-case.txt
F: license/ F: license/
F: .editorconfig F: .editorconfig
F: .mailmap
Build System Build System
M: Bruce Richardson <bruce.richardson@intel.com> M: Bruce Richardson <bruce.richardson@intel.com>

View File

@ -20,7 +20,7 @@ check_spdx() {
echo "--------------------------" echo "--------------------------"
fi fi
git grep -L SPDX-License-Identifier -- \ git grep -L SPDX-License-Identifier -- \
':^.git*' ':^.ci/*' ':^.travis.yml' \ ':^.git*' ':^.mailmap' ':^.ci/*' ':^.travis.yml' \
':^README' ':^MAINTAINERS' ':^VERSION' ':^ABI_VERSION' \ ':^README' ':^MAINTAINERS' ':^VERSION' ':^ABI_VERSION' \
':^*/Kbuild' ':^*/README' \ ':^*/Kbuild' ':^*/README' \
':^license/' ':^config/' ':^buildtools/' ':^*/poetry.lock' \ ':^license/' ':^config/' ':^buildtools/' ':^*/poetry.lock' \

View File

@ -248,6 +248,28 @@ check_release_notes() { # <patch>
grep -v $current_rel_notes grep -v $current_rel_notes
} }
check_names() { # <patch>
res=0
old_IFS=$IFS
IFS='
'
for contributor in $(sed -rn '1,/^--- / {s/.*: (.*<.*@.*>)/\1/p}' $1); do
! grep -qE "^$contributor($| <)" .mailmap || continue
name=${contributor%% <*}
if grep -q "^$name <" .mailmap; then
reason="$name mail differs from primary mail"
else
reason="$contributor is unknown"
fi
echo "$reason, please fix the commit message or update .mailmap."
res=1
done
IFS=$old_IFS
return $res
}
number=0 number=0
range='origin/main..' range='origin/main..'
quiet=false quiet=false
@ -356,6 +378,14 @@ check () { # <patch-file> <commit>
ret=1 ret=1
fi fi
! $verbose || printf '\nChecking names in commit log:\n'
report=$(check_names "$tmpinput")
if [ $? -ne 0 ] ; then
$headline_printed || print_headline "$subject"
printf '%s\n' "$report"
ret=1
fi
if [ "$tmpinput" != "$1" ]; then if [ "$tmpinput" != "$1" ]; then
rm -f "$tmpinput" rm -f "$tmpinput"
trap - INT trap - INT

View File

@ -148,6 +148,12 @@ Make your planned changes in the cloned ``dpdk`` repo. Here are some guidelines
* Follow the :ref:`coding_style` guidelines. * Follow the :ref:`coding_style` guidelines.
* If you are a new contributor, or if your mail address changed,
you may update the ``.mailmap`` file.
Otherwise the new name or address will be added by a maintainer.
Keeping this file up-to-date will help when someone wants to contact you
about the changes you contributed to.
* If you add new files or directories you should add your name to the ``MAINTAINERS`` file. * If you add new files or directories you should add your name to the ``MAINTAINERS`` file.
* Initial submission of new PMDs should be prepared against a corresponding repo. * Initial submission of new PMDs should be prepared against a corresponding repo.