summaryrefslogtreecommitdiff
path: root/t/t9001-send-email.sh
diff options
context:
space:
mode:
authorFelipe Contreras <felipe.contreras@gmail.com>2009-11-26 21:04:29 +0200
committerJunio C Hamano <gitster@pobox.com>2009-11-27 23:45:24 -0800
commitc89e32414516e906520e9bdd809560971eb52ef5 (patch)
tree27e55645be6ab932e7c38369392f0b5679c0adce /t/t9001-send-email.sh
parent4f333bc1d32a84c9ddad737ccdbd6e99ed05d396 (diff)
downloadgit-c89e32414516e906520e9bdd809560971eb52ef5.tar.gz
send-email: automatic envelope sender
This adds the option to specify the envelope sender as "auto" which would pick the 'from' address. This is good because now we can specify the address only in one place in $HOME/.gitconfig and change it easily. [jc: added tests] Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9001-send-email.sh')
-rwxr-xr-xt/t9001-send-email.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
index 0164629ed0..c23ea0f3c5 100755
--- a/t/t9001-send-email.sh
+++ b/t/t9001-send-email.sh
@@ -112,6 +112,23 @@ test_expect_success \
'Verify commandline' \
'test_cmp expected commandline1'
+test_expect_success 'Send patches with --envelope-sender=auto' '
+ clean_fake_sendmail &&
+ git send-email --envelope-sender=auto --suppress-cc=sob --from="Example <nobody@example.com>" --to=nobody@example.com --smtp-server="$(pwd)/fake.sendmail" $patches 2>errors
+'
+
+cat >expected <<\EOF
+!nobody@example.com!
+!-i!
+!nobody@example.com!
+!author@example.com!
+!one@example.com!
+!two@example.com!
+EOF
+test_expect_success \
+ 'Verify commandline' \
+ 'test_cmp expected commandline1'
+
cat >expected-show-all-headers <<\EOF
0001-Second.patch
(mbox) Adding cc: A <author@example.com> from line 'From: A <author@example.com>'