summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCélestin Matte <celestin.matte@ensimag.fr>2013-06-14 13:50:15 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-06-14 16:02:16 (GMT)
commit6c2fbe25fb8883da7925567a582dacda679e29dc (patch)
tree980d49f4e1889e7338aab635f02ab51368b4a65e
parent81f6a7a43d8c0b1310ffc2df6f9e8d607799249c (diff)
downloadgit-6c2fbe25fb8883da7925567a582dacda679e29dc.zip
git-6c2fbe25fb8883da7925567a582dacda679e29dc.tar.gz
git-6c2fbe25fb8883da7925567a582dacda679e29dc.tar.bz2
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>
-rwxr-xr-xcontrib/mw-to-git/git-remote-mediawiki.perl3
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/contrib/mw-to-git/git-remote-mediawiki.perl
index 3d1a324..5e00833 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;