From 6c2fbe25fb8883da7925567a582dacda679e29dc Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=A9lestin=20Matte?= Date: Fri, 14 Jun 2013 15:50:15 +0200 Subject: [PATCH] git-remote-mediawiki: rewrite unclear line of instructions MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Subroutines' parameters should be assigned to variable before doing anything else Besides, existing instruction affected a variable inside a "if", which break Git's coding style Signed-off-by: CĂ©lestin Matte Signed-off-by: Matthieu Moy Signed-off-by: Junio C Hamano --- contrib/mw-to-git/git-remote-mediawiki.perl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/contrib/mw-to-git/git-remote-mediawiki.perl index 3d1a324cf9..5e00833040 100755 --- a/contrib/mw-to-git/git-remote-mediawiki.perl +++ b/contrib/mw-to-git/git-remote-mediawiki.perl @@ -1333,7 +1333,8 @@ sub get_mw_namespace_id { } sub get_mw_namespace_id_for_page { - if (my ($namespace) = $_[0] =~ /^([^:]*):/) { + my $namespace = shift; + if ($namespace =~ /^([^:]*):/) { return get_mw_namespace_id($namespace); } else { return; -- 2.11.4.GIT