remote-mediawiki: fix duplicate revisions being imported
Fix a bug with revisions being imported twice. This commit is being
backported from Git-Mediawiki.git's e41ee9b ("All revisions imported
twice", 2018-02-02) to git.git. See [1] for the original commit and
[2] and [3] for the upstream PR and issue.
1. e41ee9b3a3
2. https://github.com/Git-Mediawiki/Git-Mediawiki/pull/61
3. https://github.com/Git-Mediawiki/Git-Mediawiki/issues/29
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
parent
1d42b4d01c
commit
96653ce304
|
@ -807,7 +807,10 @@ sub get_more_refs {
|
|||
sub mw_import {
|
||||
# multiple import commands can follow each other.
|
||||
my @refs = (shift, get_more_refs('import'));
|
||||
my $processedRefs;
|
||||
foreach my $ref (@refs) {
|
||||
next if $processedRefs->{$ref}; # skip duplicates: "import refs/heads/master" being issued twice; TODO: why?
|
||||
$processedRefs->{$ref} = 1;
|
||||
mw_import_ref($ref);
|
||||
}
|
||||
print {*STDOUT} "done\n";
|
||||
|
|
Loading…
Reference in New Issue