summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b822423)
raw | patch | inline | side by side (parent: b822423)
author | Brandon Casey <drafnel@gmail.com> | |
Mon, 27 Sep 2010 03:18:01 +0000 (22:18 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 27 Sep 2010 18:41:45 +0000 (11:41 -0700) |
valid_fqdn() may attempt to operate on an undefined value if
Net::Domain::domainname fails to determine the domain name. This causes
perl to emit unpleasant warnings.
So, add a check for whether $domain has been defined before using it.
Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Net::Domain::domainname fails to determine the domain name. This causes
perl to emit unpleasant warnings.
So, add a check for whether $domain has been defined before using it.
Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-send-email.perl | patch | blob | history |
diff --git a/git-send-email.perl b/git-send-email.perl
index 6dab3bf6a74bb52c7294e33dbac5bf87b51a9fdf..e1f29a72a10ff68c972b439749535d251bfd311c 100755 (executable)
--- a/git-send-email.perl
+++ b/git-send-email.perl
sub valid_fqdn {
my $domain = shift;
- return !($^O eq 'darwin' && $domain =~ /\.local$/) && $domain =~ /\./;
+ return defined $domain && !($^O eq 'darwin' && $domain =~ /\.local$/) && $domain =~ /\./;
}
sub maildomain_net {