summaryrefslogtreecommitdiff
path: root/contrib/mw-to-git
diff options
context:
space:
mode:
authorLibravatar Célestin Matte <celestin.matte@ensimag.fr>2013-06-14 15:50:26 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-06-14 09:02:17 -0700
commit4f1b7883bc9b614f3a91eff7aa46cfdc85156ceb (patch)
tree62822e15dfbfd241db6b8d7b9635929146715adb /contrib/mw-to-git
parentgit-remote-mediawiki: rename a variable ($last) which has the name of a keyword (diff)
downloadtgif-4f1b7883bc9b614f3a91eff7aa46cfdc85156ceb.tar.xz
git-remote-mediawiki: assign a variable as undef and make proper indentation
Explicitly assign local variable $/ as undef and make a proper one-instruction-by-line indentation Signed-off-by: Célestin Matte <celestin.matte@ensimag.fr> Signed-off-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/mw-to-git')
-rwxr-xr-xcontrib/mw-to-git/git-remote-mediawiki.perl5
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/contrib/mw-to-git/git-remote-mediawiki.perl
index 29fb614888..d1cddabd69 100755
--- a/contrib/mw-to-git/git-remote-mediawiki.perl
+++ b/contrib/mw-to-git/git-remote-mediawiki.perl
@@ -338,7 +338,10 @@ sub run_git {
my $args = shift;
my $encoding = (shift || "encoding(UTF-8)");
open(my $git, "-|:$encoding", "git " . $args);
- my $res = do { local $/; <$git> };
+ my $res = do {
+ local $/ = undef;
+ <$git>
+ };
close($git);
return $res;