Skip to content

Commit d49a038

Browse files
Perdugitster
authored andcommitted
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 <[email protected]> Signed-off-by: Matthieu Moy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 7c47583 commit d49a038

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

contrib/mw-to-git/git-remote-mediawiki.perl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ sub get_mw_tracked_pages {
237237
sub get_mw_page_list {
238238
my $page_list = shift;
239239
my $pages = shift;
240-
my @some_pages = @$page_list;
240+
my @some_pages = @{$page_list};
241241
while (@some_pages) {
242242
my $last_page = SLICE_SIZE;
243243
if ($#some_pages < $last_page) {
@@ -881,7 +881,7 @@ sub mw_import_revids {
881881
my $n_actual = 0;
882882
my $last_timestamp = 0; # Placeholer in case $rev->timestamp is undefined
883883

884-
foreach my $pagerevid (@$revision_ids) {
884+
foreach my $pagerevid (@{$revision_ids}) {
885885
# Count page even if we skip it, since we display
886886
# $n/$total and $total includes skipped pages.
887887
$n++;
@@ -916,7 +916,7 @@ sub mw_import_revids {
916916
my $page_title = $result_page->{title};
917917

918918
if (!exists($pages->{$page_title})) {
919-
print {*STDERR} "${n}/", scalar(@$revision_ids),
919+
print {*STDERR} "${n}/", scalar(@{$revision_ids}),
920920
": Skipping revision #$rev->{revid} of ${page_title}\n";
921921
next;
922922
}
@@ -949,7 +949,7 @@ sub mw_import_revids {
949949
# If this is a revision of the media page for new version
950950
# of a file do one common commit for both file and media page.
951951
# 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";
953953
import_file_revision(\%commit, ($fetch_from == 1), $n_actual, \%mediafile);
954954
}
955955

0 commit comments

Comments
 (0)