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>
Célestin Matte committed
Jun 14, 2013 at 15:50 UTC
d49a038451e86a207eee6b8f0fb2a022410900cc
1 file changed
+4
-4
contrib/mw-to-git/git-remote-mediawiki.perl
+4
-4
@@ -237,7 +237,7 @@ sub get_mw_tracked_pages {
237
sub get_mw_page_list {
238
my $page_list = shift;
239
my $pages = shift;
240
- my @some_pages = @$page_list;
240
+ my @some_pages = @{$page_list};
241
while (@some_pages) {
242
my $last_page = SLICE_SIZE;
243
if ($#some_pages < $last_page) {
@@ -881,7 +881,7 @@ sub mw_import_revids {
881
my $n_actual = 0;
882
my $last_timestamp = 0; # Placeholer in case $rev->timestamp is undefined
883
884
- foreach my $pagerevid (@$revision_ids) {
884
+ foreach my $pagerevid (@{$revision_ids}) {
885
# Count page even if we skip it, since we display
886
# $n/$total and $total includes skipped pages.
887
$n++;
@@ -916,7 +916,7 @@ sub mw_import_revids {
916
my $page_title = $result_page->{title};
917
918
if (!exists($pages->{$page_title})) {
919
- print {*STDERR} "${n}/", scalar(@$revision_ids),
919
+ print {*STDERR} "${n}/", scalar(@{$revision_ids}),
920
": Skipping revision #$rev->{revid} of ${page_title}\n";
921
next;
922
}
@@ -949,7 +949,7 @@ sub mw_import_revids {
949
# If this is a revision of the media page for new version
950
# of a file do one common commit for both file and media page.
951
# Else do commit only for that page.
952
- print {*STDERR} "${n}/", scalar(@$revision_ids), ": Revision #$rev->{revid} of $commit{title}\n";
952
+ print {*STDERR} "${n}/", scalar(@{$revision_ids}), ": Revision #$rev->{revid} of $commit{title}\n";
953
import_file_revision(\%commit, ($fetch_from == 1), $n_actual, \%mediafile);
954
}
955