summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2021-10-12 13:51:44 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-10-12 13:51:44 -0700
commit1af632444bb837cfccfec5b3d2e5fc935fde0fa7 (patch)
treedfa40ce2e036fc9e4b33927cce402bf23f7bbb75 /t
parentMerge branch 'so/diff-index-regression-fix' into maint (diff)
parentsend-email: fix a "first config key wins" regression in v2.33.0 (diff)
downloadtgif-1af632444bb837cfccfec5b3d2e5fc935fde0fa7.tar.xz
Merge branch 'ab/send-email-config-fix' into maint
Regression fix. * ab/send-email-config-fix: send-email: fix a "first config key wins" regression in v2.33.0
Diffstat (limited to 't')
-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 9022074474..aa0c20499b 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" &&