Git development
 help / color / mirror / Atom feed
From: Siddharth Asthana <siddharthasthana31@gmail.com>
To: git@vger.kernel.org
Cc: karthik.188@gmail.com, christian.couder@gmail.com, ps@pks.im,
	gitster@pobox.com, toon@iotcl.com, jn.avila@free.fr,
	Siddharth Asthana <siddharthasthana31@gmail.com>
Subject: [PATCH v5 0/1] cat-file: add mailmap subcommand to --batch-command
Date: Thu, 16 Apr 2026 09:02:49 +0530	[thread overview]
Message-ID: <20260416033250.4327-1-siddharthasthana31@gmail.com> (raw)
In-Reply-To: <20260415150943.40493-1-siddharthasthana31@gmail.com>

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 keeps interacting with a long-lived git-cat-file
process and it would be useful if --batch-command supported toggling
mailmap dynamically on an existing process.

This patch adds a `mailmap` subcommand to --batch-command that accepts
a boolean argument and toggles mailmap dynamically for subsequent
commands.

The series is based on top of 5361983c07 (The 22nd batch, 2026-03-21).

CI: https://gitlab.com/gitlab-org/git/-/pipelines/2456596910

Changes in v5:
- Simplify documentation: remove the `;;` sub-list describing
  `true`/`false` effects and replace with a single sentence noting
  that mailmap data is read upon the first use and only once.
- Link to v4: https://lore.kernel.org/git/20260415150943.40493-1-siddharthasthana31@gmail.com/T/#m5226263dafcf5c774c080a6688e9af0f402003c0
- Link to v3: https://lore.kernel.org/git/xmqqv7dyoei6.fsf@gitster.g/T/#m0a109f3eb5129e619ecec5f2d58ead0c5a49a4f3
- Link to v2: https://lore.kernel.org/git/xmqqv7dyoei6.fsf@gitster.g/T/#m445eab3b309bded92d1b130d225b882c73988ff2
- Link to v1: https://public-inbox.org/git/a4ec7bfa-f16b-4505-9b37-d3dd137e93cb@gmail.com/T/#m5c62fb6ad0fbcc99a706dba4c78b66359c247acd

Thanks,
Siddharth

---
Siddharth Asthana (1):
  cat-file: add mailmap subcommand to --batch-command

 Documentation/git-cat-file.adoc |   5 ++
 builtin/cat-file.c              |  37 ++++++++++++--
 t/t4203-mailmap.sh              | 105 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 143 insertions(+), 4 deletions(-)

Range-diff versus v4:

1:  25ebffe39e ! 1:  b4d6f08b43 cat-file: add mailmap subcommand to --batch-command
    @@ Documentation/git-cat-file.adoc: flush::
     +`mailmap (<bool>)`::
     +	Enable or disable mailmap for subsequent commands. The `<bool>`
     +	argument accepts the same boolean values as linkgit:git-config[1].
    -+	Possible effects are:
    -++
    -+`true`;;
    -+	Mailmap data is loaded on first use and kept in memory until the
    -+	process exits. Passing `true` again does not reload the data.
    -+`false`;;
    -+	Mailmap replacements are disabled for subsequent commands, but data
    -+	already loaded stays in memory.
    ++	The mailmap data is read upon the first use and only once.
      --
      +
      

base-commit: 5361983c075154725be47b65cca9a2421789e410
-- 
2.53.0

  parent reply	other threads:[~2026-04-16  3:32 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-28 20:36 [PATCH v1 1/1] cat-file: add use-mailmap/no-use-mailmap to --batch-command Siddharth Asthana
2026-03-29  0:50 ` Junio C Hamano
2026-03-29  7:25   ` Siddharth Asthana
2026-03-29 20:55     ` Junio C Hamano
2026-03-29  8:28 ` [PATCH v2 0/1] cat-file: add mailmap subcommand " Siddharth Asthana
2026-03-29  8:28   ` [PATCH v2 1/1] " Siddharth Asthana
2026-03-30  2:12     ` Junio C Hamano
2026-03-31  1:40       ` Siddharth Asthana
2026-03-31  3:41         ` Junio C Hamano
2026-03-30  9:44     ` Karthik Nayak
2026-03-31  1:42       ` Siddharth Asthana
2026-03-30 10:37     ` Patrick Steinhardt
2026-03-30 14:53       ` Junio C Hamano
2026-03-31  1:43       ` Siddharth Asthana
2026-03-31 17:11     ` Jean-Noël AVILA
2026-03-31 17:49       ` Junio C Hamano
2026-04-01 10:11         ` Jean-Noël Avila
2026-03-31 12:11   ` [PATCH v3 0/1] " Siddharth Asthana
2026-03-31 12:11     ` [PATCH v3 1/1] " Siddharth Asthana
2026-03-31 19:21       ` Junio C Hamano
2026-04-10 18:29         ` Junio C Hamano
2026-04-15 15:09     ` [PATCH v4 0/1] " Siddharth Asthana
2026-04-15 15:09       ` [PATCH v4 1/1] " Siddharth Asthana
2026-04-15 18:28         ` Junio C Hamano
2026-04-16  3:08           ` Siddharth Asthana
2026-04-16  3:32       ` Siddharth Asthana [this message]
2026-04-16  3:32         ` [PATCH v5 " Siddharth Asthana

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=20260416033250.4327-1-siddharthasthana31@gmail.com \
    --to=siddharthasthana31@gmail.com \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jn.avila@free.fr \
    --cc=karthik.188@gmail.com \
    --cc=ps@pks.im \
    --cc=toon@iotcl.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