aboutsummaryrefslogtreecommitdiff
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
parent9855b08d35edf8a8a441f24ff7b00e220a29f261 (diff)
downloadgit-c6038169a77854c26536f1c95176cbeb237e9e11.tar.gz
git-c6038169a77854c26536f1c95176cbeb237e9e11.tar.xz
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>
-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 8cc416115..2f18d8307 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 {