Skip to content

Commit

Permalink
git-send-email: prevent undefined variable warnings if no encryption …
Browse files Browse the repository at this point in the history
…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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Thomas Rast authored and Junio C Hamano committed Jun 28, 2008
1 parent f6bebd1 commit fa835cd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions git-send-email.perl
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit fa835cd

Please sign in to comment.