unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Subject: [PATCH 7/9] import: cat_blob is a no-op w/o live fast-import
Date: Wed, 11 Oct 2023 07:20:55 +0000	[thread overview]
Message-ID: <20231011072057.758022-8-e@80x24.org> (raw)
In-Reply-To: <20231011072057.758022-1-e@80x24.org>

cat_blob is a fallback for handling files which haven't made it
onto disk to be readable by `git cat-file'.  Thus spawning a new
fast-import process to retrieve a blob is pointless, as cat_blob
is only used as a last resort when `git cat-file' fails.
---
 lib/PublicInbox/Import.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/PublicInbox/Import.pm b/lib/PublicInbox/Import.pm
index 894ba818..6bb2c66d 100644
--- a/lib/PublicInbox/Import.pm
+++ b/lib/PublicInbox/Import.pm
@@ -123,7 +123,7 @@ sub _cat_blob ($$) {
 
 sub cat_blob {
 	my ($self, $oid) = @_;
-	_cat_blob(gfi_start($self), $oid);
+	_cat_blob($self->{io} // return, $oid);
 }
 
 sub check_remove_v1 {

  parent reply	other threads:[~2023-10-11  7:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-11  7:20 [PATCH 0/9] lei + import-related updates Eric Wong
2023-10-11  7:20 ` [PATCH 1/9] lei rediff: use ProcessIO for --drq support Eric Wong
2023-10-11  7:20 ` [PATCH 2/9] lei_xsearch: improve curl progress reporting Eric Wong
2023-10-11  7:20 ` [PATCH 3/9] msgtime: quiet warnings we can do nothing about Eric Wong
2023-10-11  7:20 ` [PATCH 4/9] msgtime: simplify msg_timestamp and msg_datestamp Eric Wong
2023-10-11  7:20 ` [PATCH 5/9] treewide: consolidate "From " line removal Eric Wong
2023-10-11  7:20 ` [PATCH 6/9] import: switch to Unix stream socket for fast-import Eric Wong
2023-10-11  7:20 ` Eric Wong [this message]
2023-10-11  7:20 ` [PATCH 8/9] lei blob: run cat_blob on lei/store for pending blobs Eric Wong
2023-10-11  7:20 ` [PATCH 9/9] lei import|tag|rm: support --commit-delay=SECONDS Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://public-inbox.org/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231011072057.758022-8-e@80x24.org \
    --to=e@80x24.org \
    --cc=meta@public-inbox.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).