+
+ my $hdr = $mime->header_obj;
+
+ my $subject = $hdr->header('Subject');
+ $subject = '(no subject)' unless defined $subject;
+ # Mime decoding can create nulls replace them with spaces to protect git
+ $subject =~ tr/\0/ /;
+ utf8::encode($subject);
+ my $at = git_timestamp(my @at = msg_datestamp($hdr));
+ my $ct = git_timestamp(my @ct = msg_timestamp($hdr));
+ if ($v2w) { # set fallbacks in case message had no date
+ $v2w->{autime} = $at[0];
+ $v2w->{cotime} = $ct[0];
+ }
+ ($name, $email, $at, $ct, $subject);