about summary refs log tree commit homepage
path: root/lib/PublicInbox/SearchIdx.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2020-10-27 07:54:25 +0000
committerEric Wong <e@80x24.org>2020-11-07 10:18:57 +0000
commit9ed4b47f4e245a08e42cc946235808a73fbc1aef (patch)
treeb074a56d656d39a3330a6e149829685c8ae19b42 /lib/PublicInbox/SearchIdx.pm
parente0ee07820a1b580ee1b755c9f9ec3c87e00727d9 (diff)
downloadpublic-inbox-9ed4b47f4e245a08e42cc946235808a73fbc1aef.tar.gz
Since we store {ibx} in $sync state, we no longer have to
pass it as an argument to log2stack.
Diffstat (limited to 'lib/PublicInbox/SearchIdx.pm')
-rw-r--r--lib/PublicInbox/SearchIdx.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/PublicInbox/SearchIdx.pm b/lib/PublicInbox/SearchIdx.pm
index d3c904c7..33c81ea8 100644
--- a/lib/PublicInbox/SearchIdx.pm
+++ b/lib/PublicInbox/SearchIdx.pm
@@ -736,11 +736,11 @@ sub process_stack {
         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);
-        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$!;
@@ -796,7 +796,7 @@ sub prepare_stack ($$) {
                 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+