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

Re: [PATCH] git-commit: search author pattern against mailmap

From
Jeff King <peff@peff.net>
Date
Aug 23, 2013, 18:35 UTC
Message-ID
<20130823183541.GB30130@sigill.intra.peff.net>
In-Reply-To
<xmqqbo4opajg.fsf@gitster.dls.corp.google.com>
On Fri, Aug 23, 2013 at 10:44:03AM -0700, Junio C Hamano wrote:
Show 12 quoted lines
> My initial reaction was "Why should something as important as 'git
> commit' should be playing a guessing-game?" ;-) and I am kind of
> ashamed to have added 146ea068 (git commit --author=$name: look
> $name up in existing commits, 2008-08-26) and then am embarrased to
> have completely forgotten about it. I never use the feature myself.
> 
> But for that old and established "--author parameter that does not
> use the standard format guesses" feature to be useful, I agree that
> it should honor the mailmap.
> 
> I wonder if it would hurt anybody if we made this unconditional, not
> even with "--no-mailmap" override? Opinions?

I think it would be OK. You can always override by giving the actual full address you want instead of a partial one. And if somebody is not up to date in the .mailmap file, maybe this would be a good hint that you should take care of that. :)

I paused for a second, thinking that such advice might not be good for people who do not want to make an official change to upstream's .mailmap (e.g., because they do not want to pollute a long-running fork that will need to merge from upstream, or do not want to pollute a topic branch with an unrelated commit). But I forgot that we have mailmap.file, if they want something custom.

So I think anyone for whom the mailmap lookup does not provide the right answer will fall into one of two groups:

  1. A one-off, which can be overridden by specifying the address you
     do want.
  2. Somebody you will be mentioning frequently; bother to set up
     a mailmap.file.

As an aside, it seems silly that we do not respect $GIT_DIR/mailmap by default, even without a config option. But I doubt that anybody cares too much, if nobody has raised the issue in all of these years.

-Peff
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 17 in “git-commit: search author pattern against mailmap”
  1. git-commit: search author pattern against mailmapAntoine Pelisse, Aug 23, 2013
  2. Junio C HamanoAug 23, 2013
  3. Jeff KingAug 23, 2013
  4. Junio C HamanoAug 23, 2013
  5. Antoine PelisseAug 23, 2013
  6. Junio C HamanoAug 23, 2013
  7. commit: search author pattern against mailmapAntoine Pelisse, Aug 24, 2013
  8. Jeff KingAug 25, 2013
  9. Junio C HamanoAug 25, 2013
  10. Antoine PelisseAug 25, 2013
  11. commit: search author pattern against mailmapAntoine Pelisse, Aug 25, 2013
  12. Jeff KingAug 25, 2013
  13. Antoine PelisseAug 25, 2013
  14. Jeff KingAug 25, 2013
  15. Antoine PelisseAug 25, 2013
  16. Junio C HamanoAug 26, 2013
  17. Jeff KingAug 26, 2013

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.