smontanari / code-forensics

A toolset for code analysis and report visualisation
383 stars 45 forks source link

Respect .mailmap file when analysing git repo #61

Closed nlochschmidt closed 3 years ago

nlochschmidt commented 3 years ago

We are using a .mailmap file to fix wrong names and merge commits from the same user. Sadly, the .mailmap file is currently being ignored by code-forensics.

I think all it takes is to change the git log command from using %an to %aN:

%an author name %aN author name (respecting .mailmap, ...)

Any reason not to use this?

smontanari commented 3 years ago

No, not really, other than using .mailmap doesn't seem to be a popular practice, and, in my experience, most repos just don't have it, or if they do it is not maintained properly. However, as you suggested, the change should be trivial as well as harmless with respect to the current functionality, and it will benefit teams (especially large ones) where effort and discipline had been put into maintaining such file. I'll get it in soon and close this issue when it's done

smontanari commented 3 years ago

@nlochschmidt I have published release 2.4.0, which, amongst other things, updates the git log command to respect the .mailmap file. I'm going to close this issue, but if you still have problems with the author log information please create a new one.

nlochschmidt commented 3 years ago

Much appreciated. Thank you!