git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC] mailmap.blob overrides default .mailmap

From
CWCornelius Weig <cornelius.weig@tngtech.com>
Date
Feb 7, 2017, 22:45 UTC
Message-ID
<53836bcd-1d4d-13fb-a523-1258017d19c9@tngtech.com>
In-Reply-To
<20170207192801.qoncjaqjpn3axpyn@sigill.intra.peff.net>
On 02/07/2017 08:28 PM, Jeff King wrote:
Show 11 quoted lines
> 
> I think it was mostly that I had to define _some_ order. This made sense
> to me as similar to things like attributes or excludes, where we prefer
> clone-specific data over in-history data (so .git/info/attributes takes
> precedence over .gitattributes).
> 
> So any mailmap.* would take precedence over the in-tree .mailmap file.
> And then between mailmap.file and mailmap.blob, the "blob" form is
> more "in-tree" than the "file" form (especially because we turn it on by
> default in bare repos, so it really is identical to the in-tree form
> there).
So the clone-specific data wins over in-history makes perfect sense to me. Therefore, mailmap.file should win over mailmap.blob, agreed.
On the other hand, a checked-in .mailmap file and a mailmap-blob are both as in-history as the other to me. Now consider the following settings:

$ git config --unset mailmap.file $ git config mailmap.blob HEAD:.mailmap $ sed -i 's:peff@peff.com:no-valid-address:' .mailmap $ git log -1 --author 'Jeff King'

So with the .mailmap being dirty, which address would one expect to be printed? I would expect 'no-valid-address', but it's 'peff@peff.com'.
Even though the .mailmap file is more visible and also closer to the user, the mailmap.blob wins over it. I find that somewhat counter-intuitive. Of course, setting `git config mailmap.file .mailmap`, would do the trick.
Previous: Jeff KingNext: Jeff King
Message 4 of 5 in “[RFC] mailmap.blob overrides default .mailmap”
  1. Cornelius WeigFeb 7, 2017
  2. Stefan BellerFeb 7, 2017
  3. Jeff KingFeb 7, 2017
  4. Cornelius WeigFeb 7, 2017
  5. Jeff KingFeb 8, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.