ejwa / gitinspector

:bar_chart: The statistical analysis tool for git repositories
GNU General Public License v3.0
2.38k stars 328 forks source link

Aliases for users #174

Closed maumueller closed 6 years ago

maumueller commented 6 years ago

Hi,

we use gitinspector in the process of grading a large university course. It makes our life so much easier, thanks a lot for it!

In our use case, we noticed some room for possible improvements. In general, we get near-duplicated entries for users when they have setup their git client incorrectly for a few commits. Moreover, even if setup correctly, our university system will give them somehow cryptic aliases. To simplify our life, we introduced an alias system for gitinspector in which you just provide a json file with entries "" : "" that replaces any alias found with the real name it should show.

I wonder whether such a system could be useful in this upstream version as well? I can provide a PR, if you think it's a good idea.

Best, Martin

adam-waldenberg commented 6 years ago

Hi Martin. Sorry for the slow response.

We have had the same problem during grading. Students actually get a "email" (and user) assigned to them from the hostname that they get on the wireless network.

Similar functionality is already present in it git itself. You can map author names and merge them together via a .mailmap file that you place in the root of the repo directory - it even supports wildcards. Gitinspector will hapilly use this information. Please check the first question in the FAQ in the wiki.

Closing the issue.

maumueller commented 6 years ago

Hi Adam. Thanks for pointing out that the feature is present in git itself. Works perfectly and is much easier to set up.