diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-06-14 04:33:26 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-06-14 04:33:26 (GMT) |
commit | 135997254a87f527bc7b29fa1803d9e0da517551 (patch) | |
tree | 113eb46a680321156194624c8b5c9edbf28491f3 /t/t9001-send-email.sh | |
parent | 289af163002a314d5a38f007715d4b12c6ef28ff (diff) | |
parent | cd5b33fbdc0299765278d0b607b64202603f0882 (diff) | |
download | git-135997254a87f527bc7b29fa1803d9e0da517551.zip git-135997254a87f527bc7b29fa1803d9e0da517551.tar.gz git-135997254a87f527bc7b29fa1803d9e0da517551.tar.bz2 |
Merge branch 'ga/send-email-sendmail-cmd'
"git send-email" learned the "--sendmail-cmd" command line option
and the "sendemail.sendmailCmd" configuration variable, which is a
more sensible approach than the current way of repurposing the
"smtp-server" that is meant to name the server to instead name the
command to talk to the server.
* ga/send-email-sendmail-cmd:
git-send-email: add option to specify sendmail command
Diffstat (limited to 't/t9001-send-email.sh')
-rwxr-xr-x | t/t9001-send-email.sh | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh index 3b75400..30eff72 100755 --- a/t/t9001-send-email.sh +++ b/t/t9001-send-email.sh @@ -2167,6 +2167,37 @@ test_expect_success $PREREQ 'leading and trailing whitespaces are removed' ' test_cmp expected-list actual-list ' +test_expect_success $PREREQ 'test using command name with --sendmail-cmd' ' + clean_fake_sendmail && + PATH="$(pwd):$PATH" \ + git send-email \ + --from="Example <nobody@example.com>" \ + --to=nobody@example.com \ + --sendmail-cmd="fake.sendmail" \ + HEAD^ && + test_path_is_file commandline1 +' + +test_expect_success $PREREQ 'test using arguments with --sendmail-cmd' ' + clean_fake_sendmail && + git send-email \ + --from="Example <nobody@example.com>" \ + --to=nobody@example.com \ + --sendmail-cmd='\''"$(pwd)/fake.sendmail" -f nobody@example.com'\'' \ + HEAD^ && + test_path_is_file commandline1 +' + +test_expect_success $PREREQ 'test shell expression with --sendmail-cmd' ' + clean_fake_sendmail && + git send-email \ + --from="Example <nobody@example.com>" \ + --to=nobody@example.com \ + --sendmail-cmd='\''f() { "$(pwd)/fake.sendmail" "$@"; };f'\'' \ + HEAD^ && + test_path_is_file commandline1 +' + test_expect_success $PREREQ 'invoke hook' ' mkdir -p .git/hooks && |