Since we store {ibx} in $sync state, we no longer have to
pass it as an argument to log2stack.
v1_checkpoint($self, $sync, $stk);
}
v1_checkpoint($self, $sync, $stk);
}
-sub log2stack ($$$$) {
- my ($sync, $git, $range, $ibx) = @_;
+sub log2stack ($$$) {
+ my ($sync, $git, $range) = @_;
my $D = $sync->{D}; # OID_BIN => NR (if reindexing, undef otherwise)
my ($add, $del);
my $D = $sync->{D}; # OID_BIN => NR (if reindexing, undef otherwise)
my ($add, $del);
- if ($ibx->version == 1) {
+ if ($sync->{ibx}->version == 1) {
my $path = $hex.'{2}/'.$hex.'{38}';
$add = qr!\A:000000 100644 \S+ ($OID) A\t$path$!;
$del = qr!\A:100644 000000 ($OID) \S+ D\t$path$!;
my $path = $hex.'{2}/'.$hex.'{38}';
$add = qr!\A:000000 100644 \S+ ($OID) A\t$path$!;
$del = qr!\A:100644 000000 ($OID) \S+ D\t$path$!;
return PublicInbox::IdxStack->new->read_prepare if $?;
}
$sync->{D} = $sync->{reindex} ? {} : undef; # OID_BIN => NR
return PublicInbox::IdxStack->new->read_prepare if $?;
}
$sync->{D} = $sync->{reindex} ? {} : undef; # OID_BIN => NR
- log2stack($sync, $git, $range, $sync->{ibx});
+ log2stack($sync, $git, $range);
}
# --is-ancestor requires git 1.8.0+
}
# --is-ancestor requires git 1.8.0+
# because we want NNTP article number gaps from unindexed
# messages to show up in mirrors, too.
$sync->{D} //= $sync->{reindex} ? {} : undef; # OID_BIN => NR
# because we want NNTP article number gaps from unindexed
# messages to show up in mirrors, too.
$sync->{D} //= $sync->{reindex} ? {} : undef; # OID_BIN => NR
- my $stk = log2stack($sync, $git, $range, $sync->{ibx});
+ my $stk = log2stack($sync, $git, $range);
my $nr = $stk ? $stk->num_records : 0;
$pr->("$nr\n") if $pr;
$sync->{stacks}->[$i] = $stk if $stk;
my $nr = $stk ? $stk->num_records : 0;
$pr->("$nr\n") if $pr;
$sync->{stacks}->[$i] = $stk if $stk;