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

Re: [PATCH v2 1/1] cat-file: add mailmap subcommand to --batch-command

From
Jean-Noël Avila <jn.avila@free.fr>
Date
Apr 1, 2026, 10:11 UTC
Message-ID
<025bbab6-0731-4df7-bc1f-a4969cb5ae13@free.fr>
In-Reply-To
<xmqqjyur28kn.fsf@gitster.g>
On 3/31/26 19:49, Junio C Hamano wrote:
Show 48 quoted lines
> Jean-Noël AVILA <jn.avila@free.fr> writes:
> 
>> On Sunday, 29 March 2026 10:28:08 CEST Siddharth Asthana wrote:
>>> git-cat-file(1)'s --batch-command works with the --use-mailmap option,
>>> but this option needs to be set when the process is created. This means
>>> we cannot change this option mid-operation.
>>>
>>> At GitLab, Gitaly caches git-cat-file processes and it would be useful
>>> if --batch-command supported toggling mailmap dynamically with existing
>>> processes.
>>>
>>> Add a `mailmap` subcommand to --batch-command that takes a single
>>> argument: `yes` to enable mailmap and `no` to disable it. When enabled,
>>> mailmap data is loaded from disk on first use and kept in memory so that
>>> toggling back on does not require reloading.
>>>
>>> Suggested-by: Junio C Hamano <gitster@pobox.com>
>>> Signed-off-by: Siddharth Asthana <siddharthasthana31@gmail.com>
>>> ---
>>> CI: https://gitlab.com/gitlab-org/git/-/pipelines/2416081861
>>>
>>>  Documentation/git-cat-file.adoc |  7 +++++
>>>  builtin/cat-file.c              | 30 ++++++++++++++++++---
>>>  t/t4203-mailmap.sh              | 48 +++++++++++++++++++++++++++++++++
>>>  3 files changed, 81 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/Documentation/git-cat-file.adoc b/Documentation/git-cat-
>> file.adoc
>>> index c139f55a16..af32e929a8 100644
>>> --- a/Documentation/git-cat-file.adoc
>>> +++ b/Documentation/git-cat-file.adoc
>>> @@ -174,6 +174,13 @@ flush::
>>>  	since the beginning or since the last flush was issued. When `--
>> buffer`
>>>  	is used, no output will come until a `flush` is issued. When `--
>> buffer`
>>>  	is not used, commands are flushed each time without issuing `flush`.
>>> +
>>> +mailmap <yes|no>::
>>
>> `yes` and `no` are keywords, and you want to express an alternative, do it 
>> like this: `mailmap (yes|no)::`.
> 
> Not 
> 
>     `mailmap (yes|no)`::
> 
> IOW, shouldn't the closing quote come before the double-colon?
Oops, you're completely right!
Previous: Junio C HamanoNext: Siddharth Asthana
Message 17 of 28 in “cat-file: add use-mailmap/no-use-mailmap to --batch-command”
  1. 1/1 cat-file: add use-mailmap/no-use-mailmap to --batch-commandSiddharth Asthana, Mar 28, 2026
  2. Junio C HamanoMar 29, 2026
  3. Siddharth AsthanaMar 29, 2026
  4. Junio C HamanoMar 29, 2026
  5. 0/1 cat-file: add mailmap subcommand to --batch-commandSiddharth Asthana, Mar 29, 2026
  6. 1/1 cat-file: add mailmap subcommand to --batch-commandSiddharth Asthana, Mar 29, 2026
  7. Junio C HamanoMar 30, 2026
  8. Siddharth AsthanaMar 31, 2026
  9. Junio C HamanoMar 31, 2026
  10. Karthik NayakMar 30, 2026
  11. Siddharth AsthanaMar 31, 2026
  12. Patrick SteinhardtMar 30, 2026
  13. Junio C HamanoMar 30, 2026
  14. Siddharth AsthanaMar 31, 2026
  15. Jean-Noël AVILAMar 31, 2026
  16. Junio C HamanoMar 31, 2026
  17. Jean-Noël AvilaApr 1, 2026
  18. 0/1 cat-file: add mailmap subcommand to --batch-commandSiddharth Asthana, Mar 31, 2026
  19. 1/1 cat-file: add mailmap subcommand to --batch-commandSiddharth Asthana, Mar 31, 2026
  20. Junio C HamanoMar 31, 2026
  21. Junio C HamanoApr 10, 2026
  22. 0/1 cat-file: add mailmap subcommand to --batch-commandSiddharth Asthana, Apr 15, 2026
  23. 1/1 cat-file: add mailmap subcommand to --batch-commandSiddharth Asthana, Apr 15, 2026
  24. Junio C HamanoApr 15, 2026
  25. Siddharth AsthanaApr 16, 2026
  26. 0/1 cat-file: add mailmap subcommand to --batch-commandSiddharth Asthana, Apr 16, 2026
  27. 1/1 cat-file: add mailmap subcommand to --batch-commandSiddharth Asthana, Apr 16, 2026
  28. Junio C HamanoMay 20, 2026

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.