From: Jean-Noël Avila Date: Wed, 01 Apr 2026 10:11:20 GMT Subject: Re: [PATCH v2 1/1] cat-file: add mailmap subcommand to --batch-command Message-ID: <025bbab6-0731-4df7-bc1f-a4969cb5ae13@free.fr> In-Reply-To: On 3/31/26 19:49, Junio C Hamano wrote: > Jean-Noël AVILA 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 >>> Signed-off-by: Siddharth Asthana >>> --- >>> 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` 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!