From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Antoine Pelisse <apelisse@gmail.com>, git <git@vger.kernel.org>
Subject: Re: [PATCH] commit: search author pattern against mailmap
Date: Mon, 26 Aug 2013 17:38:31 -0400 [thread overview]
Message-ID: <20130826213831.GA6219@sigill.intra.peff.net> (raw)
In-Reply-To: <xmqq1u5hkomf.fsf@gitster.dls.corp.google.com>
On Sun, Aug 25, 2013 at 10:27:52PM -0700, Junio C Hamano wrote:
> > I'm on the fence. It doesn't actually save that many lines of code, and
> > I guess it's possible that somebody would want a custom mailmap in the
> > future. Even though you can't do it right now, all it would take is
> > exposing read_mailmap_file and read_mailmap_blob outside of mailmap.c.
> > Of course, it would be easy to expose map_user_from at the same time.
>
> I am of two minds on this, but if I were forced to pick one _today_,
> I would have to say that I am moderately negative to the approach.
>
> Having to always specify that you want to use mailmap and make sure
> you read it is a bit cumbersome from callers' point of view, and
> using a singleton global may be one attractive way to do so.
It is also slightly wasteful, in that we may parse and store the mailmap
multiple times. But I doubt it's a big deal.
> I think it is a reasonable tentative solution to hook a singleton
> instance to something that is commonly used, e.g. the rev_info
> structure, for large subset of commands that do use the structure
> chosen to host that singleton instance, but those that do not work
> based on revision traversal (e.g. "grep") need to also honor mailmap
> consistently, so we must keep the lower level API that takes an
> explicit mailmap instance for them anyway.
My patch kept the lower-level API (well, it de-publicized it because
nobody was using it, but we do not need to do that part).
But as I said, I am on the fence, and you do not seem enthused, so let's
just drop it.
-Peff
prev parent reply other threads:[~2013-08-26 21:38 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-23 13:48 [PATCH] git-commit: search author pattern against mailmap Antoine Pelisse
2013-08-23 17:44 ` Junio C Hamano
2013-08-23 18:35 ` Jeff King
2013-08-23 19:03 ` Junio C Hamano
2013-08-23 19:47 ` Antoine Pelisse
2013-08-23 20:44 ` Junio C Hamano
2013-08-24 14:07 ` [PATCH] commit: " Antoine Pelisse
2013-08-25 4:01 ` Jeff King
2013-08-25 5:16 ` Junio C Hamano
2013-08-25 9:47 ` Antoine Pelisse
2013-08-25 10:01 ` Antoine Pelisse
2013-08-25 10:30 ` Jeff King
2013-08-25 13:37 ` Antoine Pelisse
2013-08-25 16:51 ` Jeff King
2013-08-25 20:42 ` Antoine Pelisse
2013-08-26 5:27 ` Junio C Hamano
2013-08-26 21:38 ` Jeff King [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130826213831.GA6219@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=apelisse@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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.
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 NNTP newsgroup(s).