summaryrefslogtreecommitdiff
path: root/t/t9001-send-email.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-09-15 20:15:24 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-09-15 20:15:24 (GMT)
commit10de757a09414a06739478c687ea6a24234c8ee8 (patch)
tree07e1c6562ef7e0a454e9b2cd24333353096ee4f5 /t/t9001-send-email.sh
parente8332242b74634ce34a37b0896b86b59848cf8cd (diff)
parentb996f84989f78c8f6d2429b5f0b9785e13f7af23 (diff)
downloadgit-10de757a09414a06739478c687ea6a24234c8ee8.zip
git-10de757a09414a06739478c687ea6a24234c8ee8.tar.gz
git-10de757a09414a06739478c687ea6a24234c8ee8.tar.bz2
Merge branch 'ab/send-email-config-fix'
Regression fix. * ab/send-email-config-fix: send-email: fix a "first config key wins" regression in v2.33.0
Diffstat (limited to 't/t9001-send-email.sh')
-rwxr-xr-xt/t9001-send-email.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
index 9022074..aa0c204 100755
--- a/t/t9001-send-email.sh
+++ b/t/t9001-send-email.sh
@@ -1533,6 +1533,21 @@ test_expect_success $PREREQ 'sendemail.8bitEncoding works' '
test_cmp content-type-decl actual
'
+test_expect_success $PREREQ 'sendemail.8bitEncoding in .git/config overrides --global .gitconfig' '
+ clean_fake_sendmail &&
+ git config sendemail.assume8bitEncoding UTF-8 &&
+ test_when_finished "rm -rf home" &&
+ mkdir home &&
+ git config -f home/.gitconfig sendemail.assume8bitEncoding "bogus too" &&
+ echo bogus |
+ env HOME="$(pwd)/home" DEBUG=1 \
+ git send-email --from=author@example.com --to=nobody@example.com \
+ --smtp-server="$(pwd)/fake.sendmail" \
+ email-using-8bit >stdout &&
+ egrep "Content|MIME" msgtxt1 >actual &&
+ test_cmp content-type-decl actual
+'
+
test_expect_success $PREREQ '--8bit-encoding overrides sendemail.8bitEncoding' '
clean_fake_sendmail &&
git config sendemail.assume8bitEncoding "bogus too" &&