summaryrefslogtreecommitdiff
path: root/git-send-email.perl
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2010-09-14 19:02:24 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-09-14 19:27:01 (GMT)
commit89bf1bace388c118137261e852635db92e607888 (patch)
tree96c6ed7e643816f3256d4e8e023423f7f581eb79 /git-send-email.perl
parent5879b6bbcaba7696e4abfa717748da166f915405 (diff)
downloadgit-89bf1bace388c118137261e852635db92e607888.zip
git-89bf1bace388c118137261e852635db92e607888.tar.gz
git-89bf1bace388c118137261e852635db92e607888.tar.bz2
send-email: use catfile() to concatenate files
Change send-email to use Perl's catfile() function instead of "$dir/$file". If send-email is given a $dir that ends with a / we'll end up printing a double slashed path like "dir//mtfnpy.patch". This doesn't cause any problems since Perl's IO layer will handle it, but it looks ugly. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-send-email.perl')
-rwxr-xr-xgit-send-email.perl3
1 files changed, 2 insertions, 1 deletions
diff --git a/git-send-email.perl b/git-send-email.perl
index 6dab3bf..7f702e3 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -24,6 +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 @@ 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)) {