summaryrefslogtreecommitdiff
path: root/git-send-email.perl
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2010-09-30 13:42:54 +0000
committerJunio C Hamano <gitster@pobox.com>2010-09-30 12:20:31 -0700
commitc6038169a77854c26536f1c95176cbeb237e9e11 (patch)
tree15b17b5c6c0f6b4acccb487a6df9c71659df8f22 /git-send-email.perl
parent9855b08d35edf8a8a441f24ff7b00e220a29f261 (diff)
downloadgit-c6038169a77854c26536f1c95176cbeb237e9e11.tar.gz
send-email: use lexical filehandle for opendir
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.comReviewed-by: Avery Pennarun <apenwarr@gmail.com> Reviewed-by: Jeff King <peff@peff.net> > Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-send-email.perl')
-rwxr-xr-xgit-send-email.perl6
1 files changed, 3 insertions, 3 deletions
diff --git a/git-send-email.perl b/git-send-email.perl
index 8cc4161155..2f18d83074 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -512,12 +512,12 @@ while (defined(my $f = shift @ARGV)) {
push @rev_list_opts, "--", @ARGV;
@ARGV = ();
} elsif (-d $f and !check_file_rev_conflict($f)) {
- opendir(DH,$f)
+ opendir my $dh, $f
or die "Failed to opendir $f: $!";
push @files, grep { -f $_ } map { catfile($f, $_) }
- sort readdir(DH);
- closedir(DH);
+ sort readdir $dh;
+ closedir $dh;
} elsif ((-f $f or -p $f) and !check_file_rev_conflict($f)) {
push @files, $f;
} else {