Add gitmailmap file
Problem
The different name and/or email aliases of the contributors add unecessary confusion/mental-gymnastics when I use git log -p --pretty=fuller src/Gargantext/Core/Viz/Phylo
or git blame src/Gargantext/Core/Viz/Phylo.hs
, for example to understand who can answer or review what.
This confusion extends to tools like git quick-stats
. For instance:
$ _GIT_BRANCH=dev _GIT_PATHSPEC=src/Gargantext/Core/Viz/Phylo'*' git quick-stats -V | sort -nrt, -k 10,10 | column -t -s,
Alexandre Delanoë <devel+git@delanoe.org> 10082 68% 2574 25% 151 37% 55 37% 12656 51%
qlobbe <quentin.lobbe@iscpif.fr> 3400 23% 6381 63% 164 41% 50 33% 9781 39%
Przemysław Kaminski <pk@intrepidus.pl> 781 5% 750 7% 38 9% 14 9% 1531 6%
Alfredo Di Napoli <alfredo@well-typed.com> 345 2% 143 1% 24 6% 12 8% 488 2%
Alfredo Di Napoli <alfredo.dinapoli@gmail.com> 102 1% 230 2% 9 2% 5 3% 332 1%
David Chavalarias <david.chavalarias@iscpif.fr> 91 1% 41 0% 9 2% 6 4% 132 1%
Karen Konou <konoukaren@gmail.com> 91 1% 8 0% 3 1% 2 1% 99 0%
Przemek Kaminski <pk@intrepidus.pl> 6 0% 6 0% 5 1% 5 3% 12 0%
Alp Mestanogullari <alp@well-typed.com> 4 0% 0 0% 1 0% 1 1% 4 0%
author insertions insertions_per deletions deletions_per files files_per commits commits_per lines_changed lines_changed_per
Solution
-
Add a
.mailmap
file. gitmailmap maps author/committer names and/or E-Mail addresses.
Outcomes
$ _GIT_BRANCH=mailmap _GIT_PATHSPEC=src/Gargantext/Core/Viz/Phylo'*' git quick-stats -V | sort -nrt, -k 10,10 | column -t -s,
Alexandre Delanoë <alexandre.delanoe@iscpif.fr> 10082 68% 2574 25% 151 37% 55 37% 12656 51%
Quentin Lobbé <quentin.lobbe@iscpif.fr> 3400 23% 6381 63% 164 41% 50 33% 9781 39%
Przemysław Kaminski <pk@intrepidus.pl> 787 5% 756 7% 43 11% 19 13% 1543 6%
Alfredo Di Napoli <alfredo@well-typed.com> 447 3% 373 4% 33 8% 17 11% 820 3%
David Chavalarias <david.chavalarias@iscpif.fr> 91 1% 41 0% 9 2% 6 4% 132 1%
Karen Konou <konoukaren@gmail.com> 91 1% 8 0% 3 1% 2 1% 99 0%
Alp Mestanogullari <alp@well-typed.com> 4 0% 0 0% 1 0% 1 1% 4 0%
author insertions insertions_per deletions deletions_per files files_per commits commits_per lines_changed lines_changed_per
Here the diff of git quick-stats --contributors | tail +3 | cut -f 2-
before and after adding this .mailmap
:
--- /tmp/a 2024-03-16 01:23:56.547176054 +0100
+++ /tmp/b 2024-03-16 01:23:47.329208222 +0100
@@ -2,22 +2,15 @@
Alfredo Di Napoli
Alp Mestanogullari
Christian Merten
-david Chavalarias
David Chavalarias
-delanoe
-fabien
-Fabien Maniere
Fabien Manière
Gargamelle
Guillaume Chérel
-justinwoo
+Justin Woo
Karen Konou
-Mael NICOLAS
-Mudada
+Maël Nicolas
mzheng
Nicolas Pouillard
-Przemek Kaminski
-Przemyslaw Kaminski
Przemysław Kaminski
-qlobbe
+Quentin Lobbé
Sudhir Kumar
Please register or sign in to reply