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

Possibility to merge authors #15

Closed
TLINDEN opened this issue Mar 20, 2025 · 2 comments
Closed

Possibility to merge authors #15

TLINDEN opened this issue Mar 20, 2025 · 2 comments

Comments

@TLINDEN
Copy link

TLINDEN commented Mar 20, 2025

I have the following situation:

git who table -l
┌──────────────────────────────────────────────────────────────────────────────┐
│Author                          Last Edit   Commits   Files        Lines (+/-)│
├──────────────────────────────────────────────────────────────────────────────┤
│Bobby Foo                       3 weeks ago     316     228   17,168 /   3,171│
│Foo, Bobby                      3 weeks ago     301     109   11,487 /   3,946│
│Tom the Horse                   3 weeks ago     103     156    7,788 /   7,633│
│the Horse, Tom                  2 weeks ago      22      74    6,806 /   3,918│
│...8 more...                                                                  │
└──────────────────────────────────────────────────────────────────────────────┘

As you can see, we have 2 users which show up twice each. The somewhat weird reason is, that we authenticate to Gitlab using LDAP, which sometimes reports us as prename name and sometimes as name, prename.

I'd like to have an option in git-who to merge these kind of users to get summary stats of the whole user.

For instance:

git who table -l -mergeuser "Bobby Foo+Foo, Bobby"
┌──────────────────────────────────────────────────────────────────────────────┐
│Author                          Last Edit   Commits   Files        Lines (+/-)│
├──────────────────────────────────────────────────────────────────────────────┤
│Bobby Foo                       3 weeks ago     617     337   28,655 /   6,117│
│Tom the Horse                   3 weeks ago     103     156    7,788 /   7,633│
│the Horse, Tom                  2 weeks ago      22      74    6,806 /   3,918│
│...8 more...                                                                  │
└──────────────────────────────────────────────────────────────────────────────┘

Would be really great!

@sinclairtarget
Copy link
Owner

Have you tried using Git mailmap to solve this problem?

@TLINDEN
Copy link
Author

TLINDEN commented Mar 20, 2025

Thanks a lot, it indeed does!

@TLINDEN TLINDEN closed this as completed Mar 20, 2025
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

No branches or pull requests

2 participants