Use git .mailmap file for consistent spelling of commit authors and emails #5500

Closed
opened 2025-12-29 19:28:45 +01:00 by adam · 3 comments
Owner

Originally created by @ypid on GitHub (Oct 8, 2021).

Proposed Changes

https://git-scm.com/docs/gitmailmap allows to fix names and Emails of git commits. This is often needed because commits should not be altered after being pushed and Emails and names can change or had typos.

Justification

$ git shortlog -sn --email | grep -i stretch
  2710  Jeremy Stretch <jstretch@digitalocean.com>
  2590  Jeremy Stretch <stretch@packetlife.net>
   602  jeremystretch <jstretch@ns1.com>
   389  Jeremy Stretch <jeremy.stretch@networktocode.com>
   270  Jeremy Stretch <jeremy@netverity.dev>
   131  jeremystretch <jeremy@netverity.dev>
   108  Jeremy Stretch <jstretch@ns1.com>
     3  jeremystretch <stretch@packetlife.net>

With a .mailmap file, it prints:

$ git shortlog -sn --email | grep -i stretch
  6803  Jeremy Stretch <jstretch@ns1.com>
Originally created by @ypid on GitHub (Oct 8, 2021). ### Proposed Changes https://git-scm.com/docs/gitmailmap allows to fix names and Emails of git commits. This is often needed because commits should not be altered after being pushed and Emails and names can change or had typos. ### Justification ``` $ git shortlog -sn --email | grep -i stretch 2710 Jeremy Stretch <jstretch@digitalocean.com> 2590 Jeremy Stretch <stretch@packetlife.net> 602 jeremystretch <jstretch@ns1.com> 389 Jeremy Stretch <jeremy.stretch@networktocode.com> 270 Jeremy Stretch <jeremy@netverity.dev> 131 jeremystretch <jeremy@netverity.dev> 108 Jeremy Stretch <jstretch@ns1.com> 3 jeremystretch <stretch@packetlife.net> ``` With a `.mailmap` file, it prints: ``` $ git shortlog -sn --email | grep -i stretch 6803 Jeremy Stretch <jstretch@ns1.com> ```
adam added the type: housekeeping label 2025-12-29 19:28:45 +01:00
adam closed this issue 2025-12-29 19:28:45 +01:00
Author
Owner

@jeremystretch commented on GitHub (Oct 18, 2021):

While I see the benefit, this seems like the kind of thing that will result in a lot of "junk" PRs to update metadata over time.

@jeremystretch commented on GitHub (Oct 18, 2021): While I see the benefit, this seems like the kind of thing that will result in a lot of "junk" PRs to update metadata over time.
Author
Owner

@DanSheps commented on GitHub (Oct 19, 2021):

I agree with @jeremystretch, I think we should pass on this for now, unless we decide to keep it to the project members only.

@DanSheps commented on GitHub (Oct 19, 2021): I agree with @jeremystretch, I think we should pass on this for now, unless we decide to keep it to the project members only.
Author
Owner

@jeremystretch commented on GitHub (Nov 11, 2021):

Closing this as there's been no further discussion.

@jeremystretch commented on GitHub (Nov 11, 2021): Closing this as there's been no further discussion.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5500