From: Thomas Rast Date: Thu, 26 Jun 2008 21:03:21 +0000 (+0200) Subject: git-send-email: prevent undefined variable warnings if no encryption is set X-Git-Tag: v1.6.0-rc0~177^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=fa835cd5728411bfd8f851e7327e11ad809a59d1;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/git-send-email.perl b/git-send-email.perl index 763072042..edb12c2aa 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) {