* commit 'git-send-email: add support for TLS via Net::SMTP::SSL' causes warnings
@ 2008-06-26 20:19 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
0 siblings, 2 replies; 4+ messages in thread
From: Kevin Ballard @ 2008-06-26 20:19 UTC (permalink / raw)
To: trast; +Cc: Git Mailing List
Your recent commit to next (f6bebd1) causes warnings when no form of
encryption is specified. Specifically, lines 755 and 765 reference
$smtp_encryption, but when no encryption is given at all this variable
is undefined.
-Kevin Ballard
--
Kevin Ballard
http://kevin.sb.org
kevin@sb.org
http://www.tildesoft.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] git-send-email: Fix warning triggered by f6bebd12 when no encryption is set
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 ` Kevin Ballard
2008-06-26 20:48 ` commit 'git-send-email: add support for TLS via Net::SMTP::SSL' causes warnings Thomas Rast
1 sibling, 0 replies; 4+ messages in thread
From: Kevin Ballard @ 2008-06-26 20:36 UTC (permalink / raw)
To: git; +Cc: Kevin Ballard, Junio C Hamano, trast
---
git-send-email.perl | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/git-send-email.perl b/git-send-email.perl
index 60a6551..b93cd40 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -299,6 +299,8 @@ sub read_config {
$smtp_encryption = $enc;
} elsif (Git::config_bool(@repo, "$prefix.smtpssl")) {
$smtp_encryption = 'ssl';
+ } else {
+ $smtp_encryption = '';
}
}
}
--
1.5.6.1.180.g7b731
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: commit 'git-send-email: add support for TLS via Net::SMTP::SSL' causes warnings
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 ` Thomas Rast
2008-06-26 21:03 ` Thomas Rast
1 sibling, 1 reply; 4+ messages in thread
From: Thomas Rast @ 2008-06-26 20:48 UTC (permalink / raw)
To: Kevin Ballard; +Cc: Git Mailing List
[-- Attachment #1: Type: text/plain, Size: 385 bytes --]
Kevin Ballard wrote:
> Your recent commit to next (f6bebd1) causes warnings when no form of
> encryption is specified. Specifically, lines 755 and 765 reference
> $smtp_encryption, but when no encryption is given at all this variable
> is undefined.
Sorry for the oversight on my part, and thanks for the fix! :-)
- Thomas
--
Thomas Rast
trast@student.ethz.ch
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: commit 'git-send-email: add support for TLS via Net::SMTP::SSL' causes warnings
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
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Rast @ 2008-06-26 21:03 UTC (permalink / raw)
To: Kevin Ballard; +Cc: Git Mailing List, Junio C Hamano
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-06-26 21:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox