From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Emma Brooks <me@pluvano.com>, git@vger.kernel.org
Subject: Re: [RFC PATCH] gitweb: Map names/emails with mailmap
Date: Thu, 30 Jul 2020 19:10:44 -0700 [thread overview]
Message-ID: <xmqqtuxo4eor.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <20200731010129.GD240563@coredump.intra.peff.net> (Jeff King's message of "Thu, 30 Jul 2020 21:01:29 -0400")
Jeff King <peff@peff.net> writes:
> 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).
next prev parent reply other threads:[~2020-07-31 2:11 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-30 4:12 [RFC PATCH] gitweb: Map names/emails with mailmap Emma Brooks
2020-07-30 16:20 ` Junio C Hamano
2020-07-31 1:01 ` Jeff King
2020-07-31 2:10 ` Junio C Hamano [this message]
2020-08-08 21:34 ` [PATCH] " Emma Brooks
2020-08-09 23:04 ` [PATCH v2] gitweb: map " Emma Brooks
2020-08-10 0:49 ` Eric Sunshine
2020-08-10 3:12 ` Emma Brooks
2020-08-10 5:41 ` Eric Sunshine
2020-08-10 10:02 ` Jeff King
2020-08-11 4:17 ` Emma Brooks
2020-08-11 4:48 ` Eric Sunshine
2020-08-11 4:55 ` Jeff King
2020-09-05 2:55 ` Emma Brooks
2020-09-05 3:26 ` Junio C Hamano
2020-09-07 22:10 ` Emma Brooks
2020-08-11 6:17 ` Eric Wong
2020-08-11 6:33 ` Joe Perches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqtuxo4eor.fsf@gitster.c.googlers.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=me@pluvano.com \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).