send-email: ask_default should apply to all emails, not just the first
[gitweb.git] / git-send-email.perl
index d790660bcf7bdc68a8edee6a2826447da931a9cc..fc153f9459a9b39aab159b16adf5d2b884e5285a 100755 (executable)
@@ -687,7 +687,7 @@ sub expand_aliases {
 
 # 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;
@@ -845,7 +845,6 @@ sub send_message
 
        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