summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 060009b)
raw | patch | inline | side by side (parent: 060009b)
author | Wincent Colaiuta <win@wincent.com> | |
Wed, 21 Nov 2007 12:35:05 +0000 (13:35 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 22 Nov 2007 08:50:21 +0000 (00:50 -0800) |
When using git-send-email with SMTP authentication sending a patch series
would redundantly authenticate multiple times, once for each patch. In
the worst case, this would actually prevent the series from being sent
because the server would reply with a "5.5.0 Already Authenticated"
status code which would derail the process.
This commit teaches git-send-email to authenticate once and only once at
the beginning of the series.
Signed-off-by: Wincent Colaiuta <win@wincent.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
would redundantly authenticate multiple times, once for each patch. In
the worst case, this would actually prevent the series from being sent
because the server would reply with a "5.5.0 Already Authenticated"
status code which would derail the process.
This commit teaches git-send-email to authenticate once and only once at
the beginning of the series.
Signed-off-by: Wincent Colaiuta <win@wincent.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-send-email.perl | patch | blob | history |
diff --git a/git-send-email.perl b/git-send-email.perl
index 9c6fa6441a0e58abb4a212bce1dc6951683c213e..76baa8e431e082c1e36eb9c78125094de0b8a85e 100755 (executable)
--- a/git-send-email.perl
+++ b/git-send-email.perl
my $have_email_valid = eval { require Email::Valid; 1 };
my $smtp;
+my $auth;
sub unique_email_list(@);
sub cleanup_compose_files();
}
if ((defined $smtp_authuser) && (defined $smtp_authpass)) {
- $smtp->auth( $smtp_authuser, $smtp_authpass ) or die $smtp->message;
+ $auth ||= $smtp->auth( $smtp_authuser, $smtp_authpass ) or die $smtp->message;
}
$smtp->mail( $raw_from ) or die $smtp->message;
$smtp->to( @recipients ) or die $smtp->message;