git-who
git-who copied to clipboard
[New Feature] Add Author Merging/Unification Configuration
Problem Description:
In our development environment, we utilize multiple build machines for continuous integration and automated processes. Currently, each machine may have different Git author configurations (name formatting and email addresses) for the same individual contributor. This inconsistency leads to fragmented contributor statistics in git-who, where commits from the same person appear under different author identities.
Specific Examples of Current Inconsistencies:
-
Li, Harold [email protected]
-
Harold Li [email protected]
-
Additional variations due to recent corporate email domain changes
Impact Analysis:
-
Inaccurate Contributor Statistics: git-who currently treats different author formats as separate contributors, fragmenting contribution metrics
-
Reduced Tool Effectiveness: The core purpose of git-who - to identify code ownership and contribution patterns - is undermined when author identities are fragmented
-
Team Metrics Inaccuracy: Makes it difficult to accurately assess individual contributions across projects and time
Proposed Solution:
I request a new feature that allows git-who to merge multiple author name/email variations into a single canonical identity through a configuration file. This would provide unified contributor statistics regardless of Git author configuration differences across build machines.
Suggested Implementation:
1. Configuration File: Create a YAML/JSON configuration file (e.g., .git-who-authors) that maps various author formats to a canonical identity 2. Mapping Rules: Support pattern matching for both name formats and email addresses 3. Pre-processing: Apply the author unification before generating contributor statistics Example Configuration:
author_mappings:
"Li, Harold <[email protected]>": "Harold Li <[email protected]>"
"Harold Li <[email protected]>": "Harold Li <[email protected]>"
"[email protected]": "[email protected]"
Desired Behavior
All three git-who subcommands (git who, git who tree, git who history) should respect the author unification rules, providing consistent contributor analysis regardless of which build machine generated the commits .
Acceptance Criteria
-
[ ] Configuration file supports multiple mapping formats (name, email, and combined patterns)
-
[ ] All git-who commands respect the author unification rules
-
[ ] Solution works without modifying actual Git history or commit metadata
-
[ ] Provides clear error handling for misconfigured mappings
-
[ ] Includes documentation for setup and maintenance
Technical Context
This feature would complement git-who's existing capability to analyze contributions by commits, files, and lines of change, making it more robust for enterprise environments with multiple development machines .
Additional Context
This issue became particularly relevant after recent corporate email changes, which exacerbated existing inconsistencies in our author attribution. A unified approach would significantly improve the accuracy of git-who's contributor analysis and code ownership reporting.
Labels: enhancement, feature-request, configuration, author-tracking
Generated by AI.
Another simple solution: lower case all author emails, and add a configuration to map old-company.com to company.com.
Are you aware of Git's mailmap feature? Please see this section of the README.
That's great.
But in my repository, there are about 300 contributors, the git-who shows more than 1000 authors. In worst case, the user need list 1000 email mappings. If provide a simple mapping rule can solve much work.