Skip to content

Use mailmap bindings #453

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

Merged
merged 5 commits into from
Jul 3, 2021
Merged

Use mailmap bindings #453

merged 5 commits into from
Jul 3, 2021

Conversation

o2sh
Copy link
Owner

@o2sh o2sh commented Jun 30, 2021

Following the discussion #447, I added the .mailmapauthor matching which came out to be quite straightforward thanks to the git2-rs bindings - 9ba9533.

I also changed the merging logic from "email" to "username + email" to comply with git shortlog.

Copy link
Contributor

@HallerPatrick HallerPatrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels way cleaner! If there is no .mailmap, then this will behave like before right?

@o2sh
Copy link
Owner Author

o2sh commented Jun 30, 2021

This feels way cleaner! If there is no .mailmap, then this will behave like before right?

git_mailmap_from_repository seems to purposely never errors. However, I've just noticed that commit.author_with_mailmap(&mailmap) fails if a commit's signature doesn't have an email.

I fixed it with e031a88.

Copy link
Collaborator

@spenserblack spenserblack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@o2sh o2sh merged commit 12df1fa into main Jul 3, 2021
@o2sh o2sh deleted the feature/use-mailmap branch July 3, 2021 00:55
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.

3 participants