Re: [PATCH v2] send-email: auth plain/login fix
- From
Jeff King <peff@peff.net>
- Date
- Sep 27, 2011, 21:48 UTC
- Message-ID
- <20110927214817.GD5176@sigill.intra.peff.net>
- In-Reply-To
- <1317159419-23166-1-git-send-email-zbyszek@in.waw.pl>
On Tue, Sep 27, 2011 at 11:36:59PM +0200, Zbigniew Jędrzejewski-Szmek wrote:
> v2: - added sign-off as requested, although the patch is as trivial > as it gets > - the import is performed only if it will be used
Nice, it's much better not to make the dependency required by people who are not using smtp auth, but...
Show 10 quoted lines
> diff --git a/git-send-email.perl b/git-send-email.perl
> index 37dfbe7..5a22d18 100755
> --- a/git-send-email.perl
> +++ b/git-send-email.perl
> @@ -1098,6 +1098,8 @@ X-Mailer: git-send-email $gitversion
> }
>
> if (defined $smtp_authuser) {
> + require Authen::SASL;
> + Authen::SASL->import(qw(Perl));What about people who are using smtp auth, but don't need or have Authen::SASL? I.e., shouldn't this be:
eval {
require Authen::SASL;
Authen::SASL->import(qw(Perl));
}and if we hit an error, just ignore it and continue without Authen::SASL loaded?
-Peff