Thread (34 messages) flat view 34 messages, 2 authors, 2016-06-15
DORMANTno replies

Revision v4 of 4 in this series.

Revisions (4)
  1. v1 [diff vs current]
  2. v2 [diff vs current]
  3. v4 current
  4. v6 [diff vs current]

[PATCH v4 18/31] git-remote-mediawiki: Assign a variable as undef and make proper indentation

From: Célestin Matte <hidden>
Date: 2016-06-15 22:57:42
Subsystem: the rest · Maintainer: Linus Torvalds

Explicitly assign local variable $/ as undef and make a proper
one-instruction-by-line indentation

Signed-off-by: Célestin Matte <redacted>
Signed-off-by: Matthieu Moy <redacted>
---
 contrib/mw-to-git/git-remote-mediawiki.perl |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/contrib/mw-to-git/git-remote-mediawiki.perl
index 0610daa..15ad19b 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;
-- 
1.7.9.5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help