]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Import.pm
import: reset :raw mode for commit title (subject)
[public-inbox.git] / lib / PublicInbox / Import.pm
index 1ac112b8a44222fa830f9635242155ffd00084de..65da4ddf466ad4a7309655e6436a4abb58abf742 100644 (file)
@@ -119,7 +119,7 @@ sub remove {
        $n = read($r, my $lf, 1);
        defined($n) or die "read final byte of cat-blob failed: $!";
        die "bad read on final byte: <$lf>" if $lf ne "\n";
-       my $cur = Email::MIME->new($buf);
+       my $cur = PublicInbox::MIME->new($buf);
        my $cur_s = $cur->header('Subject');
        $cur_s = '' unless defined $cur_s;
        my $cur_m = $mime->header('Subject');
@@ -191,11 +191,10 @@ sub add {
        binmode $w, ':utf8' or die "binmode :utf8 failed: $!";
        print $w "commit $ref\nmark :$commit\n",
                "author $name <$email> $date\n",
-               "committer $self->{ident} ", now2822(), "\n",
-               "data ", (bytes::length($subject) + 1), "\n",
-               $subject, "\n\n" or wfail;
+               "committer $self->{ident} ", now2822(), "\n" or wfail;
        binmode $w, ':raw' or die "binmode :raw failed: $!";
-
+       print $w "data ", (bytes::length($subject) + 1), "\n",
+               $subject, "\n\n" or wfail;
        if ($tip ne '') {
                print $w 'from ', ($parent ? $parent : $tip), "\n" or wfail;
        }