As a way more comfortable and straightforward alternative to messing around with .mailmap files, please add the "Username aliases" feature in Stash that's already existing in BitBucket.
Implement this on a per-repository, per-project as well as system-wide level as well as for users' personal repositories. Providing buttons to move a created alias to either of the other levels could ease management of this a lot.
This will also actually extend functionality because right now in 2.12.1, Stash apparently ignores globally configured .mailmap files – confirmed by Stash support – but only cares about .mailmap files inside repos.
I personally think it's a very bad idea to mix up code and some configuration that has nothing to do with it, so I'd never commit a .mailmap file directly into a repository. With a mapping feature built into Stash, the configuration would be separate from the repo files. Also, even if Stash cared about globally-set .mailmap files, bigger organizations with strict permissions could also profit from this since their server admin no longer needs to fumble around with files directly on the command line every time something needs to be changed but can do it in a few clicks in the interface – or, with Stash's global/project-level permissions, even delegate that to certain other people.
The highest priority should be on the system-level aliases, second come project-level and repository-level aliases, then personal user repositories.
As for permissions, this scheme might be a good starting point for brainstorming the perfect solution:
- Repository admins may add, edit and delete aliases set up for their repos
- Project admins may add, edit and delete aliases set up for their projects and any repos in those projects
- Stash admins may add, edit and delete aliases set up globally as well as for any project and any repo inside those
- Moving aliases to a different level is possible whenever the user has the permissions needed to manage aliases on the target level, e.g. project admins may move a repo-level alias inside one of their repos to project-level, but repo admins may not do so.
For personal user repositories, maybe have a toggle to switch system-level aliases on/off (in user settings, one toggle for all of the user's repos).