Re: [PATCH 1/1] git-send-email.perl: support executable scripts for recipient options
- From
D. Ben Knoble <ben.knoble@gmail.com>
- Date
- Mar 19, 2026, 16:47 UTC
- Message-ID
- <CALnO6CAZqAacTPgwTzAyF-ryyQxaWahXmpfCt9R_+vLS0o5uAA@mail.gmail.com>
- In-Reply-To
- <14840d8a-a1cb-4499-ba78-295c778e90d1@app.fastmail.com>
On Thu, Mar 19, 2026 at 12:13 PM Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com> wrote:
Show 27 quoted lines
> > On Thu, Mar 19, 2026, at 16:51, Jim Cromie wrote: > > Enhance git-send-email to recognize executable scripts passed to --to, > > --cc, or --bcc. When a recipient argument is an executable file, run it > > in a subshell and use its output as the recipient list. > > > > This allows users to automate recipient selection using scripts like > > get_maintainer.pl in the Linux kernel. The script is called with the > > corresponding flag (--to, --cc, or --bcc) and all remaining command-line > > arguments (typically the patches being sent). > > > > Modify execute_cmd() to support multiple arguments safely using > > quotemeta. Add test cases to verify the new functionality and ensure > > arguments are correctly passed to the scripts. > > > > Co-developed-by: Gemini CLI <gemini-cli@google.com> > > These are for people who can be emailed. > > But you’ve CCd them as well. Or was that git-send-email(1)’s action? > > > Signed-off-by: Jim Cromie <jim.cromie@gmail.com> > > --- > >[snip] > > What’s the difference between this and `--cc-cmd` and similar? I > wouldn’t know, I don’t use these `--*cmd` options.
The only difference I can think of is that we have --cc-cmd, --to-cmd, but not --bcc-cmd.
(I use --cc-cmd via config set to git-contacts for git.git so that patches mostly CC the right folks, but I typically have to manually track and add discussion participants, which is a bit of a pain.)
-- D. Ben Knoble