gpg: close stderr once finished with it in verify_signed_buffer()
[gitweb.git] / git-send-email.perl
index 91607c5878953d69a8e32731023b2eb727bcc069..d491db92c9379cf0eea63182dd704feb6582b6e7 100755 (executable)
@@ -337,8 +337,16 @@ sub read_config {
        }
 
        foreach my $setting (keys %config_path_settings) {
-               my $target = $config_path_settings{$setting}->[0];
-               $$target = Git::config_path(@repo, "$prefix.$setting") unless (defined $$target);
+               my $target = $config_path_settings{$setting};
+               if (ref($target) eq "ARRAY") {
+                       unless (@$target) {
+                               my @values = Git::config_path(@repo, "$prefix.$setting");
+                               @$target = @values if (@values && defined $values[0]);
+                       }
+               }
+               else {
+                       $$target = Git::config_path(@repo, "$prefix.$setting") unless (defined $$target);
+               }
        }
 
        foreach my $setting (keys %config_settings) {
@@ -1090,7 +1098,7 @@ sub send_message {
                                        $smtp_encryption = '';
                                        # Send EHLO again to receive fresh
                                        # supported commands
-                                       $smtp->hello();
+                                       $smtp->hello($smtp_domain);
                                } else {
                                        die "Server does not support STARTTLS! ".$smtp->message;
                                }