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

Re: [RFC PATCH] gitweb: Map names/emails with mailmap

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 31, 2020, 02:10 UTC
Message-ID
<xmqqtuxo4eor.fsf@gitster.c.googlers.com>
In-Reply-To
<20200731010129.GD240563@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 17 quoted lines
> On Thu, Jul 30, 2020 at 04:12:17AM +0000, Emma Brooks wrote:
>
>> Add an option to map names and emails to their canonical forms via a
>> .mailmap file. This is enabled by default, consistent with the behavior
>> of Git itself.
>
> I'm quite far from an expert in gitweb, but this seems like a good
> feature to have.
>
> Having a separate implementation to read and apply mailmaps makes me
> worried that it will behave slightly differently than the C code,
> especially around corner cases. Is it possible for us to ask git
> programs that are called by gitweb to do the conversion for us (e.g.,
> by passing "--use-mailmap" or using "%aE" and "%aN" formatters)?
> I won't be surprised if the answer is "no, we access commits using
> lower-level plumbing". But it's worth looking into, I think, if you
> didn't already.

I briefly looked at tweaking "rev-list --header" but because it ends up calling pretty.c::pp_header() for obvious reasons since we are doing as little processing as possible in CMIT_FMT_RAW format, we do not get to pretty.c::pp_user_info() which is where the mailmap conversion happens for the normal "log" output.

It is tempting to split pp_user_info() into two parts (i.e. the first few lines up to where map_user() is optionally called, and the remainder), so that the CMIT_FMT_RAW users can optionally ask for mailmap to kick in, but I doubt that it is worth it, if the only potential benefitter is gitweb (which I consider is purely maintenance mode---I am surprised the world hasn't yet switched to gitiles, cgit and others).

Previous: Jeff KingNext: Emma Brooks
Message 4 of 18 in “gitweb: Map names/emails with mailmap”
  1. gitweb: Map names/emails with mailmapEmma Brooks, Jul 30, 2020
  2. Junio C HamanoJul 30, 2020
  3. Jeff KingJul 31, 2020
  4. Junio C HamanoJul 31, 2020
  5. gitweb: Map names/emails with mailmapEmma Brooks, Aug 8, 2020
  6. gitweb: map names/emails with mailmapEmma Brooks, Aug 9, 2020
  7. Eric SunshineAug 10, 2020
  8. Emma BrooksAug 10, 2020
  9. Eric SunshineAug 10, 2020
  10. Jeff KingAug 10, 2020
  11. Emma BrooksAug 11, 2020
  12. Eric SunshineAug 11, 2020
  13. Jeff KingAug 11, 2020
  14. Emma BrooksSep 5, 2020
  15. Junio C HamanoSep 5, 2020
  16. Emma BrooksSep 7, 2020
  17. Eric WongAug 11, 2020
  18. Joe PerchesAug 11, 2020

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.