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

Re: Use of a mailmap file with git-log

From
Antoine Pelisse <apelisse@gmail.com>
Date
Dec 10, 2012, 19:47 UTC
Message-ID
<CALWbr2ydMkR_O-Gev7k-HjGadRJMv0UH3XdqtM0Jt=vC82GwJw@mail.gmail.com>
In-Reply-To
<7v38zdbv6d.fsf@alter.siamese.dyndns.org>
Hi,

I was thinking about that last week. It could indeed be very interesting to have mailmap applied to git-log and especially to git-log --author/--committer.

My first look at the code let me think that we would need to change the parse_commit_buffer to replace, at reading time, the name of author and committer if an option (--use-mailmap seems like a wise choice) and probably a config option. The choice of parse_commit_buffer to do the modification is due to the grepping being done directly on buffer when grepping author/committerer.

Yet I'm afraid it could be:
1. expensive to rewrite all commit log (reallocating the buffer)
2. Inappropriate to change the value in function that is supposed to
read
My 2 cents.
Cheers,
On Mon, Dec 10, 2012 at 7:48 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 21 quoted lines
> Rich Midwinter <rich.midwinter@gmail.com> writes:
>
>> I'm working on a project for a large organisation that wants to make
>> widespread use of git and the mailmap feature.
>>
>> This seems to be supported by default in git-shortlog but not git-log
>> (and other variants) without specifying custom formats, which isn't
>> really something I want to try and 'fix' across the organisation. Is
>> there a reason for this feature omission or has it just evolved that
>> way and could it be fixed?
>
> I think it was pretty much the latter, but people may already be
> depending on the command to give them the "true as recorded back
> then" names in the output.  A fix may have to involve inventing a
> new option "log --use-mailmap" that is explicitly given from the
> command line.
>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 6 in “Use of a mailmap file with git-log”
  1. Rich MidwinterDec 10, 2012
  2. Junio C HamanoDec 10, 2012
  3. Junio C HamanoDec 10, 2012
  4. Antoine PelisseDec 10, 2012
  5. Junio C HamanoDec 10, 2012
  6. Junio C HamanoDec 10, 2012

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.