about summary refs log tree commit homepage
path: root/lib/PublicInbox/Import.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-01-03 02:06:15 +0000
committerEric Wong <e@80x24.org>2021-01-03 18:30:31 +0000
commit71461c67fee940b05309baa8c67bac10c8c51ac6 (patch)
tree07ab30ed55e4bd62ab2022167e14e0ae09bb43ad /lib/PublicInbox/Import.pm
parent323d8bac125e89a76c904a54a7ae0b2e36f05cc6 (diff)
downloadpublic-inbox-71461c67fee940b05309baa8c67bac10c8c51ac6.tar.gz
We don't need to be keeping the raw message around after it hits
git.  Shard work now relies on Storable (or Sereal) and all of
the indexing code relies on the Email::MIME-like API of Eml to
access interesting parts of the message.

Similarly, smsg->{raw_bytes} is no longer carried around and we
do the CRLF adjustment when setting smsg->{bytes}.

There's also a small simplification to t/import.t while
we're in the area to use xqx instead of spawn/popen_rd.
Diffstat (limited to 'lib/PublicInbox/Import.pm')
-rw-r--r--lib/PublicInbox/Import.pm4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/PublicInbox/Import.pm b/lib/PublicInbox/Import.pm
index 052b145b..8a06a661 100644
--- a/lib/PublicInbox/Import.pm
+++ b/lib/PublicInbox/Import.pm
@@ -412,12 +412,10 @@ sub add {
         # v2: we need this for Xapian
         if ($smsg) {
                 $smsg->{blob} = $self->get_mark(":$blob");
-                $smsg->{raw_bytes} = $n;
+                $smsg->set_bytes($raw_email, $n);
                 if (my $oidx = delete $smsg->{-oidx}) { # used by LeiStore
                         return if $oidx->blob_exists($smsg->{blob});
                 }
-                # XXX do we need this? it's in git at this point
-                $smsg->{-raw_email} = \$raw_email;
         }
         my $ref = $self->{ref};
         my $commit = $self->{mark}++;