summaryrefslogtreecommitdiff
path: root/t/t9001-send-email.sh
diff options
context:
space:
mode:
authorJay Soffian <jaysoffian@gmail.com>2009-03-31 16:22:12 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-04-01 18:11:21 (GMT)
commitdc1460aa8de64f62b4612b6d2546ed7b88050de2 (patch)
treead4c752bb4a7e4b04de2bf78235043a1e99c454e /t/t9001-send-email.sh
parent5906f54e474c6e8aabb0f6b955d446b509cde06e (diff)
downloadgit-dc1460aa8de64f62b4612b6d2546ed7b88050de2.zip
git-dc1460aa8de64f62b4612b6d2546ed7b88050de2.tar.gz
git-dc1460aa8de64f62b4612b6d2546ed7b88050de2.tar.bz2
send-email: ask_default should apply to all emails, not just the first
Commit 6e18251 made the "Send this email?" prompt assume yes if confirm = "inform" when it was unable to get a valid response. However, the "yes" assumption only worked correctly for the first email. This commit fixes the issue and confirms the fix by modifying the existing test for the prompt to send multiple emails. Reported by Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Jay Soffian <jaysoffian@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.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
index b4de98c..195ff8b 100755
--- a/t/t9001-send-email.sh
+++ b/t/t9001-send-email.sh
@@ -462,12 +462,14 @@ test_expect_success 'confirm by default (due to --compose)' '
test_expect_success 'confirm detects EOF (inform assumes y)' '
CONFIRM=$(git config --get sendemail.confirm) &&
git config --unset sendemail.confirm &&
+ rm -fr outdir &&
+ git format-patch -2 -o outdir &&
GIT_SEND_EMAIL_NOTTY=1 \
git send-email \
--from="Example <nobody@example.com>" \
--to=nobody@example.com \
--smtp-server="$(pwd)/fake.sendmail" \
- $patches < /dev/null
+ outdir/*.patch < /dev/null
ret="$?"
git config sendemail.confirm ${CONFIRM:-never}
test $ret = "0"