git-send-email: prevent undefined variable warnings if no encryption is set
authorThomas Rast <trast@student.ethz.ch>
Thu, 26 Jun 2008 21:03:21 +0000 (23:03 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sat, 28 Jun 2008 23:49:33 +0000 (16:49 -0700)
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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-send-email.perl
index 763072042db808f5bf4e26c6080a0e7660ff9518..edb12c2aaaa64a13d0c59f8432d2ddd7d1cf75bd 100755 (executable)
@@ -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) {