From: Junio C Hamano Date: Tue, 31 Mar 2026 03:41:18 GMT Subject: Re: [PATCH v2 1/1] cat-file: add mailmap subcommand to --batch-command Message-ID: In-Reply-To: <72543649-7994-4220-86fb-e3c84faf0b6a@gmail.com> Siddharth Asthana writes: >> * Can we somehow make mailmap object itself slightly smarter so >> that it knows if it has already been asked to read the data from >> its sources? It is a pretty dumb string_list, but from a cursory >> read of the code flow, it seems that mailmap.strdup_strings is >> initialized to be false in builtin/cat-file.c and then one of the >> first things done in mailmap.c::read_mailmap() is to flip that >> bit on, so the "yes" part of the parse_cmd_mailmap() might become >> >> if (yes) >> load_mailmap(); >> >> with the helper load_mailmap() that may look like: This part was a bit misstated. What I meant was more like if (!strcmp(...yes)) use_mailmap = 1; else if (!strcmp(...no)) use_mailmap = 0; else die(_("misconfigured")); if (use_mailmap) load_mailmap();