Skip to content

Support .mailmap for author identity resolution#79

Merged
andrew merged 2 commits intogit-pkgs:mainfrom
miketheman:miketheman/78-mailmap
Feb 5, 2026
Merged

Support .mailmap for author identity resolution#79
andrew merged 2 commits intogit-pkgs:mainfrom
miketheman:miketheman/78-mailmap

Conversation

@miketheman
Copy link
Contributor

Add mailmap parsing and resolution to correctly attribute contributors when a .mailmap file exists in the repository root. This helps deduplicate author entries in blame, history, and stats output.

Supports all four mailmap formats:

Resolves #78

Add mailmap parsing and resolution to correctly attribute contributors
when a .mailmap file exists in the repository root. This helps deduplicate
author entries in blame, history, and stats output.

Supports all four mailmap formats:
- Proper Name <email> (canonical name for email)
- <proper@email> <commit@email> (email replacement)
- Proper Name <proper@email> <commit@email> (full replacement by email)
- Proper Name <proper@email> Commit Name <commit@email> (full match)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@miketheman
Copy link
Contributor Author

@andrew I don't write much go, so I had a bot help me here. It seems reasonably isolated to me, and I built and ran it on my example repo and it produced the expected results after a git-pkgs init --force && git-pkgs stats

The bisect command now resolves author names and emails through .mailmap
when displaying the culprit commit. This ensures consistent author
attribution across all commands (blame, stats, history, and bisect).

Adds test coverage to verify mailmap resolution works correctly when
bisect identifies the first bad commit.
@andrew
Copy link
Contributor

andrew commented Feb 5, 2026

LGTM, thanks @miketheman, I've added the same approach to the bisect command as well.

@andrew andrew merged commit a129c07 into git-pkgs:main Feb 5, 2026
4 checks passed
@miketheman miketheman deleted the miketheman/78-mailmap branch February 5, 2026 16:27
@andrew
Copy link
Contributor

andrew commented Feb 5, 2026

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.

Support .mailmap to correctly attribute Contributors

2 participants