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

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

From
Jeff King <peff@peff.net>
Date
Feb 8, 2017, 19:50 UTC
Message-ID
<20170208195022.6kqpgit3lkvskxta@sigill.intra.peff.net>
In-Reply-To
<53836bcd-1d4d-13fb-a523-1258017d19c9@tngtech.com>
On Tue, Feb 07, 2017 at 11:45:31PM +0100, Cornelius Weig wrote:
> 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:

I think it depends how you use them. You could point mailmap.blob to some other ref entirely (even one that you fetched from another repository).

I'd expect normal use to point it to HEAD:.mailmap, though (and that was certainly the use case I wrote it for). On the other hand, the point of pointing it to that particular blob is that it works even when you _don't_ have a checkout (and this kicks in automatically in a bare repo).

> $ 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'

In case anybody wants to experiment, there are a bunch of things that make this a non-working example (at least on git.git):

  - my address is actually peff.net :)
  - There mailmap which mentions peff.net maps peff@github.com to
    peff.net, so this change would require --author=peff@github.com.
  - We don't apply mailmaps for the default output of "git log". You can
    format with "%aN %aE", or just use "git shortlog -ns --author=peff"
    which does map.

But that aside, yeah, you can make an argument to expect one way or the other, depending on the situation you set up. I don't have a strong feeling about it, but my gut feeling is that no ordering is significantly better than the other, and that puts me in favor of leaving it as-is purely out of inertia and backwards-compatibility.

-Peff
Previous: Cornelius Weig
Message 5 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.