about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--lib/PublicInbox/ExtSearchIdx.pm2
-rw-r--r--lib/PublicInbox/V2Writable.pm4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/PublicInbox/ExtSearchIdx.pm b/lib/PublicInbox/ExtSearchIdx.pm
index 14ffdadb..2d230dc1 100644
--- a/lib/PublicInbox/ExtSearchIdx.pm
+++ b/lib/PublicInbox/ExtSearchIdx.pm
@@ -361,7 +361,7 @@ sub update_last_commit { # overrides V2Writable
                 die "Unsupported inbox version: $v";
         }
         my $last = $self->{oidx}->eidx_meta($meta_key);
-        if (defined $last && is_ancestor($unit->{git}, $last, $latest_cmt)) {
+        if (defined $last && is_ancestor($self->git, $last, $latest_cmt)) {
                 my @cmd = (qw(rev-list --count), "$last..$latest_cmt");
                 chomp(my $n = $unit->{git}->qx(@cmd));
                 return if $n ne '' && $n == 0;
diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm
index 87b76501..cf44c95b 100644
--- a/lib/PublicInbox/V2Writable.pm
+++ b/lib/PublicInbox/V2Writable.pm
@@ -966,7 +966,7 @@ sub update_last_commit {
         my $latest_cmt = $stk ? $stk->{latest_cmt} : ${$sync->{latest_cmt}};
         defined($latest_cmt) or return;
         my $last = last_epoch_commit($self, $unit->{epoch});
-        if (defined $last && is_ancestor($unit->{git}, $last, $latest_cmt)) {
+        if (defined $last && is_ancestor($self->git, $last, $latest_cmt)) {
                 my @cmd = (qw(rev-list --count), "$last..$latest_cmt");
                 chomp(my $n = $unit->{git}->qx(@cmd));
                 return if $n ne '' && $n == 0;
@@ -1003,7 +1003,7 @@ sub log_range ($$$) {
         my $range = "$cur..$tip";
         $pr->("$i.git checking contiguity... ") if $pr;
         my $git = $unit->{git};
-        if (is_ancestor($git, $cur, $tip)) { # common case
+        if (is_ancestor($sync->{self}->git, $cur, $tip)) { # common case
                 $pr->("OK\n") if $pr;
                 my $n = $git->qx(qw(rev-list --count), $range);
                 chomp($n);