]> asedeno.scripts.mit.edu Git - git.git/commitdiff
Merge branch 'ab/send-email-catfile'
authorJunio C Hamano <gitster@pobox.com>
Wed, 29 Sep 2010 20:50:02 +0000 (13:50 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 29 Sep 2010 20:50:02 +0000 (13:50 -0700)
* ab/send-email-catfile:
  send-email: use catfile() to concatenate files

1  2 
git-send-email.perl

diff --combined git-send-email.perl
index e1f29a72a10ff68c972b439749535d251bfd311c,7f702e379fa0166442515de33cf8c2381a40f3c2..08c8c3c25f8ed3aecf19f56a16db22ffa86f8d0b
@@@ -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 {