Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add mailmap #79

Merged
merged 1 commit into from
Jun 17, 2021
Merged

add mailmap #79

merged 1 commit into from
Jun 17, 2021

Conversation

umarcor
Copy link
Collaborator

@umarcor umarcor commented Jun 16, 2021

This PR adds a .mailmap file for cleaning the output of git's author list, which is used in tools such as gource or gitinspector.

Without this PR:

# git shortlog --summary --numbered --email
  1735  stnolting <stnolting@gmail.com>
   180  Stephan <stnolting@gmail.com>
    86  umarcor <unai.martinezcorral@ehu.eus>
     7  Lars Asplund <lars.anders.asplund@gmail.com>
     4  tmeissner <programming@goodcleanfun.de>
     3  AWenzel83 <Andreas.Wenzel@hs-wismar.de>
     2  Andreas Wenzel <Andreas.Wenzel@hs-wismar.de>
     1  Pascal Cotret <pascal.cotret@gmail.com>
     1  Unai Martinez-Corral <38422348+umarcor@users.noreply.github.com>

With this PR:

# git shortlog --summary --numbered --email
  1915  Stephan Nolting <stnolting@gmail.com>
    88  Unai Martinez-Corral <unai.martinezcorral@ehu.eus>
     7  Lars Asplund <lars.anders.asplund@gmail.com>
     5  Andreas Wenzel <Andreas.Wenzel@hs-wismar.de>
     4  Torsten Meissner <programming@goodcleanfun.de>
     1  Pascal Cotret <pascal.cotret@gmail.com>

@stnolting
Copy link
Owner

I just googled the purpose of a .mailmap file - I was not aware of it (or the "issue" it closes) at all 😅
This file needs to be updated manually if there are new contributors, right?

@umarcor
Copy link
Collaborator Author

umarcor commented Jun 17, 2021

I just googled the purpose of a .mailmap file - I was not aware of it (or the "issue" it closes) at all 😅
This file needs to be updated manually if there are new contributors, right?

Yes, and no. You can update it if you want, but it will not "hide" the contributors which are not listed in the mailmap. It is just a table of aliases/replacements which is used if any of those show up. For instance, if I remove Stephan Nolting <stnolting@gmail.com> <stnolting@gmail.com> from the mailmap I get:

# git shortlog --summary --numbered --email
  1735  stnolting <stnolting@gmail.com>
   180  Stephan <stnolting@gmail.com>
    88  Unai Martinez-Corral <unai.martinezcorral@ehu.eus>
     7  Lars Asplund <lars.anders.asplund@gmail.com>
     5  Andreas Wenzel <Andreas.Wenzel@hs-wismar.de>
     4  Torsten Meissner <programming@goodcleanfun.de>
     1  Pascal Cotret <pascal.cotret@gmail.com>

As you see, the results from Stephan/stnolting were not hidden, but it does not know that those are the same person.

Therefore, you don't need to update the mailmap when new contributors arrive; you can do it if you want when some existing contributor uses a new e-mail name.

@stnolting
Copy link
Owner

Now I get it 😄
Thank you 👍

@stnolting stnolting merged commit 8e51947 into stnolting:master Jun 17, 2021
@umarcor umarcor deleted the add-mailmap branch June 17, 2021 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants