via llvm-dev
2021-May-25 14:00 UTC
[llvm-dev] [cfe-dev] Proposal: Adding a toplevel .mailmap file
Offhand this seems like a good idea to me—as another example, someone might change companies and therefore email addresses, but it would be good to have a way to identify all contributions from the same person. On the other hand… github IDs can have multiple addresses, is there a way to leverage that? But maybe github IDs are a github thing rather than a git thing, which makes that difficult? --paulr From: cfe-dev <cfe-dev-bounces at lists.llvm.org> On Behalf Of Nico Weber via cfe-dev Sent: Tuesday, May 25, 2021 9:31 AM To: llvm-dev <llvm-dev at lists.llvm.org>; cfe-dev <cfe-dev at lists.llvm.org> Subject: [cfe-dev] Proposal: Adding a toplevel .mailmap file Hi, I commit LLVM patches using two different email addresses. This means my changes show up as two lines in `git shortlog -nes <path>`, and `git log --author=thakis` only finds some of my changes. I know several others also use commit using different email addresses. It's possible to add a file `.mailmap` to the root of the repo that tells git to merge different email addresses to the same person for display purposes (https://git-scm.com/docs/gitmailmap<https://urldefense.com/v3/__https:/git-scm.com/docs/gitmailmap__;!!JmoZiZGBv3RvKRSx!tP5GjShGmoDCp9BanQE-t9ziaOL_xFjKcougap5sqbszoaFmjb_DUgTf5fjSgf-Vgw$>). For example, if that file exists and contains Nico Weber <thakis at chromium.org<mailto:thakis at chromium.org>> <nicolasweber at gmx.de<mailto:nicolasweber at gmx.de>> then `git log --author=thakis` will show all my commits. I currently have that locally. Should we have this file checked in? Everybody who wanted could add their different aliases, and it gives people control over what they want to show as their primary email address. Linux for example has it checked in: https://github.com/torvalds/linux/blob/master/.mailmap<https://urldefense.com/v3/__https:/github.com/torvalds/linux/blob/master/.mailmap__;!!JmoZiZGBv3RvKRSx!tP5GjShGmoDCp9BanQE-t9ziaOL_xFjKcougap5sqbszoaFmjb_DUgTf5fipW-yJZw$> Nico -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210525/ffb468de/attachment-0001.html>
Nico Weber via llvm-dev
2021-May-25 14:04 UTC
[llvm-dev] [cfe-dev] Proposal: Adding a toplevel .mailmap file
Yes, `git shortlog` and `git log` are local git concepts that don't know about github. On Tue, May 25, 2021 at 10:01 AM <paul.robinson at sony.com> wrote:> Offhand this seems like a good idea to me—as another example, someone > might change companies and therefore email addresses, but it would be good > to have a way to identify all contributions from the same person. > > > > On the other hand… github IDs can have multiple addresses, is there a way > to leverage that? But maybe github IDs are a github thing rather than a > git thing, which makes that difficult? > > --paulr > > > > *From:* cfe-dev <cfe-dev-bounces at lists.llvm.org> *On Behalf Of *Nico > Weber via cfe-dev > *Sent:* Tuesday, May 25, 2021 9:31 AM > *To:* llvm-dev <llvm-dev at lists.llvm.org>; cfe-dev <cfe-dev at lists.llvm.org> > *Subject:* [cfe-dev] Proposal: Adding a toplevel .mailmap file > > > > Hi, > > > > I commit LLVM patches using two different email addresses. This means my > changes show up as two lines in `git shortlog -nes <path>`, and `git log > --author=thakis` only finds some of my changes. I know several others also > use commit using different email addresses. > > > > It's possible to add a file `.mailmap` to the root of the repo that tells > git to merge different email addresses to the same person for display > purposes (https://git-scm.com/docs/gitmailmap > <https://urldefense.com/v3/__https:/git-scm.com/docs/gitmailmap__;!!JmoZiZGBv3RvKRSx!tP5GjShGmoDCp9BanQE-t9ziaOL_xFjKcougap5sqbszoaFmjb_DUgTf5fjSgf-Vgw$>). > For example, if that file exists and contains > > > > Nico Weber <thakis at chromium.org> <nicolasweber at gmx.de> > > > > then `git log --author=thakis` will show all my commits. > > > > I currently have that locally. Should we have this file checked in? > Everybody who wanted could add their different aliases, and it gives people > control over what they want to show as their primary email address. Linux > for example has it checked in: > https://github.com/torvalds/linux/blob/master/.mailmap > <https://urldefense.com/v3/__https:/github.com/torvalds/linux/blob/master/.mailmap__;!!JmoZiZGBv3RvKRSx!tP5GjShGmoDCp9BanQE-t9ziaOL_xFjKcougap5sqbszoaFmjb_DUgTf5fipW-yJZw$> > > > > Nico >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210525/23cc4c6d/attachment.html>
Renato Golin via llvm-dev
2021-May-25 14:37 UTC
[llvm-dev] [cfe-dev] Proposal: Adding a toplevel .mailmap file
On Tue, 25 May 2021 at 15:01, via llvm-dev <llvm-dev at lists.llvm.org> wrote:> Offhand this seems like a good idea to me—as another example, someone > might change companies and therefore email addresses, but it would be good > to have a way to identify all contributions from the same person. >+1, I have contributed with many different emails over the years... :) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210525/a5f340f8/attachment.html>