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
Siddharth Asthana <siddharthasthana31@gmail.com>
Date
Mar 31, 2026, 01:43 UTC
Message-ID
<81fc274c-a1ff-44d6-bd55-afc2308b6d9a@gmail.com>
In-Reply-To
<acpSgZ8RgBIE-h1Q@pks.im>
On 30/03/26 16:07, Patrick Steinhardt wrote:
Show 29 quoted lines
> On Sun, Mar 29, 2026 at 01:58:08PM +0530, Siddharth Asthana wrote:
>> diff --git a/builtin/cat-file.c b/builtin/cat-file.c
>> index b6f12f41d6..a53926d2bb 100644
>> --- a/builtin/cat-file.c
>> +++ b/builtin/cat-file.c
>> @@ -692,6 +693,24 @@ static void parse_cmd_info(struct batch_options *opt,
>>   	batch_one_object(line, output, opt, data);
>>   }
>>   
>> +static void parse_cmd_mailmap(struct batch_options *opt UNUSED,
>> +			      const char *line,
>> +			      struct strbuf *output UNUSED,
>> +			      struct expand_data *data UNUSED)
>> +{
>> +	if (!strcmp(line, "yes")) {
>> +		if (!mailmap_loaded) {
>> +			read_mailmap(the_repository, &mailmap);
>> +			mailmap_loaded = 1;
>> +		}
>> +		use_mailmap = 1;
>> +	} else if (!strcmp(line, "no")) {
>> +		use_mailmap = 0;
>> +	} else {
>> +		die(_("mailmap: unknown argument '%s', expected 'yes' or 'no'"), line);
>> +	}
>> +}
> 
> Not commenting on the overall chanegchange, but I guess we should use
> `git_parse_maybe_bool()` here?
Yep, agreed. I will switch to git_parse_maybe_bool() in v3.
> 
> Patrick
Previous: Junio C HamanoNext: Jean-Noël AVILA
Message 14 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.