dumping ground for random patches and texts
 help / color / mirror / Atom feed
* [PATCH] lei_remote: solver supports in-progress blobs
@ 2024-04-12 17:53 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2024-04-12 17:53 UTC (permalink / raw)
  To: spew

---
 lib/PublicInbox/LeiRemote.pm | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/lib/PublicInbox/LeiRemote.pm b/lib/PublicInbox/LeiRemote.pm
index 559fb8d5..ddcaf2c9 100644
--- a/lib/PublicInbox/LeiRemote.pm
+++ b/lib/PublicInbox/LeiRemote.pm
@@ -67,9 +67,16 @@ sub base_url { "$_[0]->{uri}" }
 
 sub smsg_eml {
 	my ($self, $smsg) = @_;
-	if (my $bref = $self->{lei}->ale->git->cat_file($smsg->{blob})) {
-		return PublicInbox::Eml->new($bref);
-	}
+	my $bref = $self->{lei}->ale->git->cat_file($smsg->{blob}) // do {
+		my $lms = $self->{lei}->lms;
+		($lms ? $lms->local_blob($smsg->{blob}, 1) : undef) // do {
+			my $sto = $self->{lei}->{sto} //
+					$self->{lei}->_lei_store;
+			$sto && $sto->{-wq_s1} ?
+				$sto->wq_do('cat_blob', $smsg->{blob}) : undef;
+		}
+	};
+	return PublicInbox::Eml->new($bref) if $bref;
 	warn("E: $self->{uri} $smsg->{blob} gone <$smsg->{mid}>\n");
 	undef;
 }

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-04-12 17:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-12 17:53 [PATCH] lei_remote: solver supports in-progress blobs Eric Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).