From: Jeff King Date: Sun, 25 Aug 2013 10:30:41 GMT Subject: Re: [PATCH] commit: search author pattern against mailmap Message-ID: <20130825103041.GB12556@sigill.intra.peff.net> In-Reply-To: <1377424889-15399-1-git-send-email-apelisse@gmail.com> On Sun, Aug 25, 2013 at 12:01:29PM +0200, Antoine Pelisse wrote: > So I kept clear_mailmap() where you put it, but I think it could be moved > right after get_revision(). That is because I think format_commit_message() > will run another read_mailmap() with an heap-allocated string_list. > Anyway, I'm not sure it makes a big difference here. Yeah, format_commit_message does not even pay attention to our revs.mailmap. It does make me wonder if there should simply be a static singleton mailmap that gets loaded once per program invocation and then cleaned up at exit. That is clearly what format_commit_message is doing. Is there actually a use case for having a custom one in rev_info? It's not like you can even control where it reads from when you call read_mailmap. I guess we need it as a boolean "do we want to mailmap at all" for the regular pretty formats, but it could just be a flag in rev_info instead of a pointer. -Peff