my $sender = '';
my $from = $mime->header('From');
+ $from ||= '';
my ($email) = PublicInbox::Address::emails($from);
my ($name) = PublicInbox::Address::names($from);
if (!defined($name) || !defined($email)) {
$sender = $mime->header('Sender');
+ $sender ||= '';
if (!defined($name)) {
($name) = PublicInbox::Address::names($sender);
}
sub atfork_child {
my ($self) = @_;
foreach my $f (qw(in out)) {
+ next unless defined($self->{$f});
close $self->{$f} or die "failed to close import[$f]: $!\n";
}
}
push @buf, $buf;
} elsif (/^M 100644 ([a-f0-9]+) (\w+)/) {
my ($oid, $path) = ($1, $2);
+ $tree->{$path} = 1;
if ($purge->{$oid}) {
push @oids, $oid;
- delete $tree->{$path};
+ my $cmd = "M 100644 inline $path\ndata 0\n\n";
+ push @buf, $cmd;
} else {
- $tree->{$path} = 1;
push @buf, $_;
}
} elsif (/^D (\w+)/) {