From: Thomas Rast <trast@student.ethz.ch>
To: Kevin Ballard <Kevin@sb.org>
Cc: Git Mailing List <git@vger.kernel.org>,
Junio C Hamano <gitster@pobox.com>
Subject: Re: commit 'git-send-email: add support for TLS via Net::SMTP::SSL' causes warnings
Date: Thu, 26 Jun 2008 23:03:21 +0200 [thread overview]
Message-ID: <200806262303.23269.trast@student.ethz.ch> (raw)
In-Reply-To: <200806262248.02866.trast@student.ethz.ch>
I wrote:
>
> and thanks for the fix
Well, actually at second glance your fix is wrong. Putting it in
read_config() means it will be executed the first time around already,
when we read the identity's settings. So with the patch,
$smtp_encryption is set to '' during identity parsing, and any value
set in the global [sendemail] section never takes effect.
Let's do the following instead. Sorry for all the noise.
-- 8< --
git-send-email: prevent undefined variable warnings if no encryption is set
With the previous patch, not configuring any encryption (either on or
off) would leave $smtp_encryption undefined. We simply set it to the
empty string in that case.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
---
git-send-email.perl | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/git-send-email.perl b/git-send-email.perl
index 7630720..edb12c2 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -313,6 +313,9 @@ foreach my $setting (values %config_bool_settings) {
${$setting->[0]} = $setting->[1] unless (defined (${$setting->[0]}));
}
+# 'default' encryption is none -- this only prevents a warning
+$smtp_encryption = '' unless (defined $smtp_encryption);
+
# Set CC suppressions
my(%suppress_cc);
if (@suppress_cc) {
--
1.5.6.1.187.g35a8
prev parent reply other threads:[~2008-06-26 21:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-26 20:19 commit 'git-send-email: add support for TLS via Net::SMTP::SSL' causes warnings Kevin Ballard
2008-06-26 20:36 ` [PATCH] git-send-email: Fix warning triggered by f6bebd12 when no encryption is set Kevin Ballard
2008-06-26 20:48 ` commit 'git-send-email: add support for TLS via Net::SMTP::SSL' causes warnings Thomas Rast
2008-06-26 21:03 ` Thomas Rast [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200806262303.23269.trast@student.ethz.ch \
--to=trast@student.ethz.ch \
--cc=Kevin@sb.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox