my ($msgs, $nosubject) = @_;
require PublicInbox::Thread;
my $th = PublicInbox::Thread->new(@$msgs);
+
+ # WARNING! both these Mail::Thread knobs were found by inspecting
+ # the Mail::Thread 2.55 source code, and we have some monkey patches
+ # in PublicInbox::Thread to fix memory leaks. Since Mail::Thread
+ # appears unmaintained, I suppose it's safe to depend on these
+ # variables for now:
no warnings 'once';
$Mail::Thread::nosubject = $nosubject;
+ # Keep ghosts with only a single direct child:
+ $Mail::Thread::noprune = 1;
$th->thread;
$th->order(*sort_ts);
$th