Make git cat-file support mailmap
Goal
The goal would be to make it possible for git cat-file
to output commits and (perhaps) tag objects, where the content of the "author", "committer" and "tagger" fields have been passed through the mailmap mechanism, so that the email addresses and names are updated and not necessary the original email addresses and names.
This would be a big step towards resolving gitlab#14909
Proposed solution
It could be done by adding a new command line option, and/or maybe a config variable, in a similar way as what was done for git log
, git shortlog
and git show
which have:
--[no-]mailmap, --[no-]use-mailmap
Use mailmap file to map author and committer names and email addresses to canonical real names and email addresses.
See git-shortlog(1).
and
https://git-scm.com/docs/git-config#Documentation/git-config.txt-logmailmap
See also Git's mailmap doc