Fixes #35738 - Add a git mailmap
In the release notes we like to credit people based on the git log, but regularly people use multiple names. Git has a mailmap feature which allows mapping it back to one single name.
Today we have a script with an author map but as we're moving to foreman-documentation it's nice to implement this in repositories themselves so no specific tooling is needed.
To test this out, use git log --pretty="%aN" --abbrev-commit.
@evgeni this currently doesn't work for Adam and Nofar, but I can't seem to find the right way to do this. Any idea?
Issues: #35738
Because your syntax is wrong. It's new name <new address> matcher where matcher can be name <address> or just <address>.
this works for me:
Adam Cécile <[email protected]> <[email protected]>
Adam Růžička <[email protected]> <[email protected]>
Adam Růžička <[email protected]> <[email protected]>
Adam Růžička <[email protected]> <[email protected]>
Adi Abramovich <[email protected]>
Andrew Dewar <[email protected]>
Karolina Malyjurkova <[email protected]> <[email protected]>
Leos Stejskal <[email protected]> <[email protected]>
Lukáš Zapletal <[email protected]> <[email protected]>
Lukáš Zapletal <[email protected]> <[email protected]>
Marcel Kühlhorn <[email protected]> <[email protected]>
Marek Hulán <[email protected]> <[email protected]>
Marek Hulán <[email protected]> <[email protected]>
Marek Hulán <[email protected]> <[email protected]>
Maria Agaphontzev <[email protected]>
Nofar Alfassi <[email protected]> <[email protected]>
Nofar Alfassi <[email protected]> <[email protected]>
Ondřej Ezr <[email protected]> <[email protected]>
Ondřej Ezr <[email protected]> <[email protected]>
Shimon Shtein <[email protected]> <[email protected]>
Yifat Makias <[email protected]> <[email protected]>
Yifat Makias <[email protected]> <[email protected]>
Štefan Németh <snemeth@dynamic-2a00-1028-83a6-3cba-0eb1-2bbc-4b42-8938.ipv6.o2.cz>
Peter Koprda <[email protected]> <[email protected]>
Peter Koprda <[email protected]> <[email protected]>
I think this is now a reasonable result. There's still room for more deduplication of identities because some people (both of us included) have used multiple email adresses:
$ git log --pretty="%aN <%aE>" --abbrev-commit | sort -u | wc -l
509
$ git log --pretty="%aN" --abbrev-commit | sort -u | wc -l
455
However, this mostly solves the different spelling used in various names.
@evgeni any thoughts on if we should keep this per repository or have common mailmap? I like the per-repo approach because it makes git just work. On the other hand, you do have duplication.
Slight preference on deduplication
Related: we have a Contributors file that wasn't updated since 1.21. Having a correct mailmap could make that easier as well.
Alternative implementation: https://github.com/theforeman/theforeman.org/pull/2113