summaryrefslogtreecommitdiff
path: root/refspec.h
diff options
context:
space:
mode:
authorLibravatar Gregory Anders <greg@gpanders.com>2021-05-14 09:15:53 -0600
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-05-17 07:06:13 +0900
commitcd5b33fbdc0299765278d0b607b64202603f0882 (patch)
treefa42252cddb0b168ffadbe75f5c94a7e3b0b424c /refspec.h
parentGit 2.31.1 (diff)
downloadtgif-cd5b33fbdc0299765278d0b607b64202603f0882.tar.xz
git-send-email: add option to specify sendmail command
The sendemail.smtpServer configuration option and --smtp-server command line option both support using a sendmail-like program to send emails by specifying an absolute file path. However, this is not ideal for the following reasons: 1. It overloads the meaning of smtpServer (now a program is being used for the server?) 2. It doesn't allow for non-absolute paths, arguments, or arbitrary scripting Requiring an absolute path is bad for portability, as the same program may be in different locations on different systems. If a user wishes to pass arguments to their program, they have to use the smtpServerOption option, which is cumbersome (as it must be repeated for each option) and doesn't adhere to normal git conventions. Introduce a new configuration option sendemail.sendmailCmd as well as a command line option --sendmail-cmd that can be used to specify a command (with or without arguments) or shell expression to run to send email. The name of this option is consistent with --to-cmd and --cc-cmd. This invocation honors the user's $PATH so that absolute paths are not necessary. Arbitrary shell expressions are also supported, allowing users to do basic scripting. Give this option a higher precedence over --smtp-server and sendemail.smtpServer, as the new interface is more flexible. For backward compatibility, continue to support absolute paths in --smtp-server and sendemail.smtpServer. Signed-off-by: Gregory Anders <greg@gpanders.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refspec.h')
0 files changed, 0 insertions, 0 deletions