git-remote-mediawiki: rewrite unclear line of instructions

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 <celestin.matte@ensimag.fr> Signed-off-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Célestin Matte committed Jun 14, 2013 at 15:50 UTC 6c2fbe25fb8883da7925567a582dacda679e29dc
1 file changed +2 -1
contrib/mw-to-git/git-remote-mediawiki.perl
+2 -1
@@ -1333,7 +1333,8 @@ sub get_mw_namespace_id {
1333 }
1334
1335 sub get_mw_namespace_id_for_page {
1336 - if (my ($namespace) = $_[0] =~ /^([^:]*):/) {
1336 + my $namespace = shift;
1337 + if ($namespace =~ /^([^:]*):/) {
1338 return get_mw_namespace_id($namespace);
1339 } else {
1340 return;