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.lorimer.id.au/gitweb.git/diff_plain/fa835cd5728411bfd8f851e7327e11ad809a59d1?ds=inline;hp=--cc 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 --- fa835cd5728411bfd8f851e7327e11ad809a59d1 diff --git a/git-send-email.perl b/git-send-email.perl index 763072042d..edb12c2aaa 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -313,6 +313,9 @@ sub read_config { ${$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) {