use PublicInbox::Address;
use PublicInbox::MsgTime qw(msg_timestamp msg_datestamp);
use PublicInbox::ContentId qw(content_digest);
use PublicInbox::Address;
use PublicInbox::MsgTime qw(msg_timestamp msg_datestamp);
use PublicInbox::ContentId qw(content_digest);
my $git_dir = $git->{git_dir};
my @cmd = ('git', "--git-dir=$git_dir", qw(fast-import
--quiet --done --date-format=raw));
my $git_dir = $git->{git_dir};
my @cmd = ('git', "--git-dir=$git_dir", qw(fast-import
--quiet --done --date-format=raw));
my $env = { GIT_INDEX_FILE => $index };
run_die([@cmd, qw(read-tree -m -v -i), $self->{ref}], $env);
}
my $env = { GIT_INDEX_FILE => $index };
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 {
+ run_die([@cmd, 'update-server-info']);
+ my $ibx = $self->{-inbox};
+ ($ibx && $self->{path_type} eq '2/38') and eval {
$self->{bytes_added} += $n;
print $w "blob\nmark :$blob\ndata ", $n, "\n" or wfail;
$self->{bytes_added} += $n;
print $w "blob\nmark :$blob\ndata ", $n, "\n" or wfail;
# v2: we need this for Xapian
if ($self->{want_object_info}) {
my $oid = $self->get_mark(":$blob");
# v2: we need this for Xapian
if ($self->{want_object_info}) {
my $oid = $self->get_mark(":$blob");
sub run_die ($;$$) {
my ($cmd, $env, $rdr) = @_;
my $pid = spawn($cmd, $env, $rdr);
sub run_die ($;$$) {
my ($cmd, $env, $rdr) = @_;
my $pid = spawn($cmd, $env, $rdr);
waitpid($pid, 0) == $pid or die join(' ', @$cmd) .' did not finish';
$? == 0 or die join(' ', @$cmd) . " failed: $?\n";
}
waitpid($pid, 0) == $pid or die join(' ', @$cmd) .' did not finish';
$? == 0 or die join(' ', @$cmd) . " failed: $?\n";
}