# for Import and v1 non-SQLite WWW code paths
sub populate {
- my ($self, $hdr, $v2w) = @_;
+ my ($self, $hdr, $sync) = @_;
for my $f (qw(From To Cc Subject)) {
my @all = $hdr->header($f);
my $val = join(', ', @all);
}
$self->{$f} = $val if $val ne '';
}
- $v2w //= {};
- $self->{-ds} = [ my @ds = msg_datestamp($hdr, $v2w->{autime}) ];
- $self->{-ts} = [ my @ts = msg_timestamp($hdr, $v2w->{cotime}) ];
+ $sync //= {};
+ $self->{-ds} = [ my @ds = msg_datestamp($hdr, $sync->{autime}) ];
+ $self->{-ts} = [ my @ts = msg_timestamp($hdr, $sync->{cotime}) ];
$self->{ds} //= $ds[0]; # no zone
$self->{ts} //= $ts[0];
num => $smsg->{num},
mid => $smsg->{mid},
}, 'PublicInbox::Smsg';
- my $v2w = { autime => $smsg->{ds}, cotime => $smsg->{ts} };
- $new_smsg->populate($new_mime, $v2w);
+ my $sync = { autime => $smsg->{ds}, cotime => $smsg->{ts} };
+ $new_smsg->populate($new_mime, $sync);
do_idx($self, \$raw, $new_mime, $new_smsg);
}
$rewritten->{rewrites};
blob => $oid,
mid => $mid0,
}, 'PublicInbox::Smsg';
- $smsg->populate($mime, $self);
+ $smsg->populate($mime, $sync);
if (do_idx($self, $msgref, $mime, $smsg)) {
reindex_checkpoint($self, $sync, $git);
}
while (my ($f, $at, $ct, $oid) = $stk->pop_rec) {
$self->{current_info} = "$i.git $oid";
if ($f eq 'm') {
- $self->{autime} = $at;
- $self->{cotime} = $ct;
+ $sync->{autime} = $at;
+ $sync->{cotime} = $ct;
reindex_oid($self, $sync, $git, $oid);
} elsif ($f eq 'd') {
unindex_oid($self, $git, $oid);
}
}
- delete @$self{qw(autime cotime)};
+ delete @$sync{qw(autime cotime)};
update_last_commit($self, $git, $i, $stk->{latest_cmt});
}