mbox series

[0/2] send-email: add --header-cmd option

Message ID 20230423122744.4865-1-maxim.cournoyer@gmail.com (mailing list archive)
Headers show
Series send-email: add --header-cmd option | expand

Message

Maxim Cournoyer April 23, 2023, 12:27 p.m. UTC
Hi,

This adds a new --header-cmd option to the send-email command, joining
in the ranks of '--cc-cmd' and '--to-cmd'.  The header-cmd script
provided as argument should output 'header: value' lines, such as:

  X-Debbugs-Cc: someone@example.com
  AnotherHeader: somevalue
  [...]

This change was motivated by the use case of easing collaboration
using Debbugs in GNU Guix [0].

[0]  https://issues.guix.gnu.org/58813

Thanks,

Maxim Cournoyer (2):
  send-email: extract execute_cmd from recipients_cmd
  send-email: add --header-cmd option

 Documentation/config/sendemail.txt |  1 +
 Documentation/git-send-email.txt   |  5 ++++
 git-send-email.perl                | 38 +++++++++++++++++++++++-------
 t/t9001-send-email.sh              | 21 +++++++++++++++--
 4 files changed, 54 insertions(+), 11 deletions(-)


base-commit: 7580f92ffa970b9484ac214f7b53cec5e26ca4bc

Comments

Junio C Hamano April 24, 2023, 9:45 p.m. UTC | #1
Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

> This adds a new --header-cmd option to the send-email command, joining
> in the ranks of '--cc-cmd' and '--to-cmd'.

It sounds more like it makes these old two unnecessary, which is a
very good thing if it is the case ;-).
Maxim Cournoyer April 25, 2023, 1:50 a.m. UTC | #2
Hi Junio,

Junio C Hamano <gitster@pobox.com> writes:

> Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:
>
>> This adds a new --header-cmd option to the send-email command, joining
>> in the ranks of '--cc-cmd' and '--to-cmd'.
>
> It sounds more like it makes these old two unnecessary, which is a
> very good thing if it is the case ;-).

You are right, that --header-cmd can be considered as some kind of
generalization of the more specific --cc-cmd and --to-cmd options; I
hadn't given it much thought myself :-).