run_die([@cmd, qw(read-tree -m -v -i), $self->{ref}], $env);
}
run_die([@cmd, 'update-server-info'], undef);
- ($self->{path_type} eq '2/38') and eval {
+ my $ibx = $self->{-inbox};
+ ($ibx && $self->{path_type} eq '2/38') and eval {
require PublicInbox::SearchIdx;
- my $ibx = $self->{-inbox} || $git_dir;
my $s = PublicInbox::SearchIdx->new($ibx);
$s->index_sync({ ref => $self->{ref} });
};
}
my $blob = $self->{mark}++;
- my $str = $mime->as_string;
- my $n = length($str);
+ my $raw_email = $mime->{-public_inbox_raw} // $mime->as_string;
+ my $n = length($raw_email);
$self->{bytes_added} += $n;
print $w "blob\nmark :$blob\ndata ", $n, "\n" or wfail;
- print $w $str, "\n" or wfail;
+ print $w $raw_email, "\n" or wfail;
# v2: we need this for Xapian
if ($self->{want_object_info}) {
my $oid = $self->get_mark(":$blob");
- $self->{last_object} = [ $oid, $n, \$str ];
+ $self->{last_object} = [ $oid, $n, \$raw_email ];
}
my $ref = $self->{ref};
my $commit = $self->{mark}++;
return if $nreplace == 0;
- run_die([@git, qw(-c gc.reflogExpire=now gc --prune=all)]);
+ run_die([@git, qw(-c gc.reflogExpire=now gc --prune=all --quiet)]);
# check that old OIDs are gone
my $err = 0;