chiark / gitweb /
Avoid use of "my $_", which is not portable
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 22 Jun 2015 17:11:39 +0000 (18:11 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 22 Jun 2015 17:11:39 +0000 (18:11 +0100)
Debian/Dgit.pm

index 48aae18..37cbc51 100644 (file)
@@ -211,7 +211,7 @@ sub git_for_each_ref ($$;$) {
 sub git_get_ref ($) {
     # => '' if no such ref
     my ($refname) = @_;
-    my $_ = $refname;
+    local $_ = $refname;
     s{^refs/}{[r]efs/} or die "$refname $_ ?";
     return cmdoutput qw(git for-each-ref --format=%(objectname)), $_;
 }