From: Junio C Hamano Date: Wed, 29 Sep 2010 20:50:02 +0000 (-0700) Subject: Merge branch 'ab/send-email-catfile' X-Git-Tag: v1.7.4-rc0~198 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/34289ec35f2c9b1d7a1956e609a053f982e2ddd3?ds=inline;hp=-c Merge branch 'ab/send-email-catfile' * ab/send-email-catfile: send-email: use catfile() to concatenate files --- 34289ec35f2c9b1d7a1956e609a053f982e2ddd3 diff --combined git-send-email.perl index e1f29a72a1,7f702e379f..08c8c3c25f --- a/git-send-email.perl +++ b/git-send-email.perl @@@ -24,6 -24,7 +24,7 @@@ use Text::ParseWords use Data::Dumper; use Term::ANSIColor; use File::Temp qw/ tempdir tempfile /; + use File::Spec::Functions qw(catfile); use Error qw(:try); use Git; @@@ -511,7 -512,7 +512,7 @@@ while (defined(my $f = shift @ARGV)) opendir(DH,$f) or die "Failed to opendir $f: $!"; - push @files, grep { -f $_ } map { +$f . "/" . $_ } + push @files, grep { -f $_ } map { catfile($f, $_) } sort readdir(DH); closedir(DH); } elsif ((-f $f or -p $f) and !check_file_rev_conflict($f)) { @@@ -895,7 -896,7 +896,7 @@@ sub sanitize_address 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 {