From dfbe27bb5533ef391b214692f25e2823b20064ac Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 24 Jul 2020 05:55:54 +0000 Subject: use consistent {ibx} field for writable code paths This is a step which makes our use of abbreviations more consistent when referring to PublicInbox::Inbox objects. We'll also be reducing the number of redundant fields in SearchIdx and V2Writable code paths to make the object graph easier-to-follow. --- lib/PublicInbox/Import.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/PublicInbox/Import.pm') diff --git a/lib/PublicInbox/Import.pm b/lib/PublicInbox/Import.pm index d565b0a0..b50c662c 100644 --- a/lib/PublicInbox/Import.pm +++ b/lib/PublicInbox/Import.pm @@ -35,7 +35,7 @@ sub new { ident => "$name <$email>", mark => 1, ref => $ref, - -inbox => $ibx, + ibx => $ibx, path_type => '2/38', # or 'v2' lock_path => "$git->{git_dir}/ssoma.lock", # v2 changes this bytes_added => 0, @@ -176,7 +176,7 @@ sub _update_git_info ($$) { run_die([@cmd, qw(read-tree -m -v -i), $self->{ref}], $env); } run_die([@cmd, 'update-server-info']); - my $ibx = $self->{-inbox}; + my $ibx = $self->{ibx}; ($ibx && $self->{path_type} eq '2/38') and eval { require PublicInbox::SearchIdx; my $s = PublicInbox::SearchIdx->new($ibx); @@ -385,7 +385,7 @@ sub add { # spam check: if ($check_cb) { - $mime = $check_cb->($mime, $self->{-inbox}) or return; + $mime = $check_cb->($mime, $self->{ibx}) or return; } my $blob = $self->{mark}++; -- cgit v1.2.3-24-ge0c7