summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5906f54)
raw | patch | inline | side by side (parent: 5906f54)
author | Jay Soffian <jaysoffian@gmail.com> | |
Tue, 31 Mar 2009 16:22:12 +0000 (12:22 -0400) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 1 Apr 2009 18:11:21 +0000 (11:11 -0700) |
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>
= "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>
git-send-email.perl | patch | blob | history | |
t/t9001-send-email.sh | patch | blob | history |
diff --git a/git-send-email.perl b/git-send-email.perl
index d790660bcf7bdc68a8edee6a2826447da931a9cc..fc153f9459a9b39aab159b16adf5d2b884e5285a 100755 (executable)
--- a/git-send-email.perl
+++ b/git-send-email.perl
# Variables we set as part of the loop over files
our ($message_id, %mail, $subject, $reply_to, $references, $message,
- $needs_confirm, $message_num);
+ $needs_confirm, $message_num, $ask_default);
sub extract_valid_address {
my $address = shift;
if ($needs_confirm && !$dry_run) {
print "\n$header\n";
- my $ask_default;
if ($needs_confirm eq "inform") {
$confirm_unconfigured = 0; # squelch this message for the rest of this run
$ask_default = "y"; # assume yes on EOF since user hasn't explicitly asked for confirmation
diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
index b4de98c1f2a3d56858744dab4a06d96a30acdb81..195ff8b27b655065259ad135b50c346b93b12d09 100755 (executable)
--- a/t/t9001-send-email.sh
+++ b/t/t9001-send-email.sh
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"