Skip to content

Commit

Permalink
git-remote-mediawiki: rewrite unclear line of instructions
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Célestin Matte authored and Junio C Hamano committed Jun 14, 2013
1 parent 81f6a7a commit 6c2fbe2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion contrib/mw-to-git/git-remote-mediawiki.perl
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6c2fbe2

Please sign in to comment.