-
Notifications
You must be signed in to change notification settings - Fork 286
I'm on the Authors list twice #923
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
Comments
All your commits were not made with the same email address: To fix it you need to create a |
Oh, thanks! |
Do you think it's worth adding this to an FAQ? 🤔 |
It's more of a problem with me being inexperienced with git |
To be fair, I think mailmap isn't a well-known feature 🙂 |
Oh yeah, good point 😆 |
The opposite is also happening: |
Even with having a .mailmap file available I see duplicated authors. Can anyone confirm with this repo? |
@beutlich Looks like your diff --git a/.mailmap b/.mailmap
index 864f8ad46..5b7291e7b 100644
--- a/.mailmap
+++ b/.mailmap
@@ -114,8 +114,7 @@ Stephan Ziegler <[email protected]>
Sven Erik Mattson <svenerik@7ce873d0-865f-4ce7-a662-4bb36ea78beb>
Thomas Beutlich <beutlich@7ce873d0-865f-4ce7-a662-4bb36ea78beb>
Thomas Beutlich <[email protected]>
-Thomas Beutlich <[email protected]>
-Thomas Beutlich <[email protected]>
+Thomas Beutlich <[email protected]> <[email protected]>
Thomas Bödrich <ThomasBoedrich@7ce873d0-865f-4ce7-a662-4bb36ea78beb>
Volker Waurich <[email protected]>
carlj-w <[email protected]> Also, this would work: diff --git a/.mailmap b/.mailmap
index 864f8ad46..aede18718 100644
--- a/.mailmap
+++ b/.mailmap
@@ -112,10 +112,9 @@ Stefan Wischhusen <wischhusen@7ce873d0-865f-4ce7-a662-4bb36ea78beb>
Stefan Wischhusen <[email protected]>
Stephan Ziegler <[email protected]>
Sven Erik Mattson <svenerik@7ce873d0-865f-4ce7-a662-4bb36ea78beb>
-Thomas Beutlich <beutlich@7ce873d0-865f-4ce7-a662-4bb36ea78beb>
-Thomas Beutlich <[email protected]>
-Thomas Beutlich <[email protected]>
-Thomas Beutlich <[email protected]>
+<[email protected]> <beutlich@7ce873d0-865f-4ce7-a662-4bb36ea78beb>
+<[email protected]> <[email protected]>
+<[email protected]> <[email protected]>
Thomas Bödrich <ThomasBoedrich@7ce873d0-865f-4ce7-a662-4bb36ea78beb>
Volker Waurich <[email protected]>
carlj-w <[email protected]> More information here: https://git-scm.com/docs/gitmailmap AFAIK This behavior is consistent with |
Thanks for the fast reply @spenserblack. I generated that .mailmap file with line-wise author listing based on https://kevin.burke.dev/kevin/easy-maintenance-of-your-authors-file/ and it worked out in git or TortoiseGit. Is there any chance that onefetch could also consider these line-wise author mapping? |
See #447 (and the linked PRs/issues in that discussion) for some more context, but I think we're pretty much set on sticking with email as the identifier. I don't think that script was really intended to generate a If you search for |
Thank your for your fast feedback.
Sorry for not being excat enough. The given .mailmap file with line-wise authors is correctly taken into account by both Also, https://git-scm.com/docs/gitmailmap mentions
as the corrected example to fix the names. Given these points, my expectation was that this kind of formatting is a valid format for .mailmap (even it its original intent of generation was some AUTHORS file). |
Yes, which I interpret as the email being the person's identifier, and the name being a label. I.e. "this email has this name," not "this name has this email." Do you notice any change at all when you uncheck "use .mailmap"? Because, since your You might want to see TortoiseGit's own You are correct that If your statement is "onefetch is not using the However, if your statement is "onefetch should combine matching author names into one record," then I believe there is some potential merit in that, given the low chances of two people having the same name in small to medium-sized projects, and I'd recommend raising a new issue so we could discuss that specifically. Even if we've already discussed and switched away from that, it could be good to at least reconsider. |
Thanks for the detailed reply and your offers. I now adapted the corresponding .mailmap file to the expected format. Unfortunately this was manual work. |
🤔 It's never pleasant to do manual work 😅 However, if you've gotten your mailmap into a good initial state now, it shouldn't be too difficult to write a script to detect any names or emails in the log that aren't in the mailmap. You could run this script in a GitHub workflow so that you're made aware when a new author is added (this can be triggered by a PR to catch it ahead of time or on push to the main branch to handle squash merges). Personally, I've never bothered to add every author to a mailmap. Just the ones where I know the same person used two or more committer names/emails. |
Hm, as a side-effect of the .mailmap format change GitHub no longer displays the correct author avatar in the commit history. Edit: Seems to be a browser caching issue. |
Duplicates
Current behavior 😯
Onefetch reports two Authors, when there is only one. Both authors are the same person.
Expected behavior 🤔
Onefetch reports one Author.
Steps to reproduce 🕹
Additional context/Screenshots 🔦
Possible Solution 💡
No response
The text was updated successfully, but these errors were encountered: