diff options
author | Célestin Matte <celestin.matte@ensimag.fr> | 2013-06-14 15:50:36 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-06-14 09:02:18 -0700 |
commit | d49a038451e86a207eee6b8f0fb2a022410900cc (patch) | |
tree | 079140c7d6e8d28ac3fab0606863fe63a8106a8c /contrib/mw-to-git | |
parent | git-remote-mediawiki: fix a typo ("mediwiki" instead of "mediawiki") (diff) | |
download | tgif-d49a038451e86a207eee6b8f0fb2a022410900cc.tar.xz |
git-remote-mediawiki: clearly rewrite double dereference
@$var structures are re-written in the following way: @{$var}
It makes them more readable.
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>
Diffstat (limited to 'contrib/mw-to-git')
-rwxr-xr-x | contrib/mw-to-git/git-remote-mediawiki.perl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/contrib/mw-to-git/git-remote-mediawiki.perl index 3935b0dcbf..2246c84483 100755 --- a/contrib/mw-to-git/git-remote-mediawiki.perl +++ b/contrib/mw-to-git/git-remote-mediawiki.perl @@ -237,7 +237,7 @@ sub get_mw_tracked_pages { sub get_mw_page_list { my $page_list = shift; my $pages = shift; - my @some_pages = @$page_list; + my @some_pages = @{$page_list}; while (@some_pages) { my $last_page = SLICE_SIZE; if ($#some_pages < $last_page) { @@ -881,7 +881,7 @@ sub mw_import_revids { my $n_actual = 0; my $last_timestamp = 0; # Placeholer in case $rev->timestamp is undefined - foreach my $pagerevid (@$revision_ids) { + foreach my $pagerevid (@{$revision_ids}) { # Count page even if we skip it, since we display # $n/$total and $total includes skipped pages. $n++; @@ -916,7 +916,7 @@ sub mw_import_revids { my $page_title = $result_page->{title}; if (!exists($pages->{$page_title})) { - print {*STDERR} "${n}/", scalar(@$revision_ids), + print {*STDERR} "${n}/", scalar(@{$revision_ids}), ": Skipping revision #$rev->{revid} of ${page_title}\n"; next; } @@ -949,7 +949,7 @@ sub mw_import_revids { # If this is a revision of the media page for new version # of a file do one common commit for both file and media page. # Else do commit only for that page. - print {*STDERR} "${n}/", scalar(@$revision_ids), ": Revision #$rev->{revid} of $commit{title}\n"; + print {*STDERR} "${n}/", scalar(@{$revision_ids}), ": Revision #$rev->{revid} of $commit{title}\n"; import_file_revision(\%commit, ($fetch_from == 1), $n_actual, \%mediafile); } |