Skip to content

Commit

Permalink
git-remote-mediawiki: assign a variable as undef and make proper inde…
Browse files Browse the repository at this point in the history
…ntation

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>
  • Loading branch information
Célestin Matte authored and Junio C Hamano committed Jun 14, 2013
1 parent b835baf commit 4f1b788
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion contrib/mw-to-git/git-remote-mediawiki.perl
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4f1b788

Please sign in to comment.