From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Jonathan Tan <jonathantanmy@google.com>,
git@vger.kernel.org, steadmon@google.com,
hanyang.tony@bytedance.com, me@ttaylorr.com
Subject: Re: [PATCH v2 3/4] t5300: move --window clamp test next to unclamped
Date: Thu, 14 Nov 2024 15:41:08 +0900 [thread overview]
Message-ID: <xmqqiksq71x7.fsf@gitster.g> (raw)
In-Reply-To: <20241114005652.GC1140565@coredump.intra.peff.net> (Jeff King's message of "Wed, 13 Nov 2024 19:56:52 -0500")
Jeff King <peff@peff.net> writes:
>> As far as I know, index-pack, when run as part of fetch, indexes a pack
>> that's not in the repository's object store; it indexes a packfile in a
>> temp directory. (So I don't think this is a strange thing to do.)
>
> When fetching (or receiving a push), we use "index-pack --stdin" and do
> write the resulting pack into the repository (and the command will
> complain if there is no repository).
> ...
>> We definitely should prevent the segfault, but I think that's better
>> done by making --promisor only work if we run index-pack from within a
>> repo. I don't think we can restrict the repacking to run only if we're
>> indexing a pack within the repo, because in our fetch case, we're
>> indexing a new pack - not one within the repo.
>
> I think the "--stdin" thing above neatly solves this.
> ...
> Yeah, I guess the fundamental thing here is that anybody who isn't
> passing "--promisor" is not going to be affected, so that at least
> limits the opportunity for surprise.
>
> The quarantine discussion above is an example of how there could be
> unexpected consequences. I _think_ it's OK based on what I wrote, but
> hopefully that explains my general feeling of surprise. I dunno. It
> still may be the least bad thing.
Tying this extra processing to the use of "--stdin" is not exactly
intuitive, in that a "--stdin" user is not necessarily doing a fetch
(even though a fetch may always use "--stdin"), but I guess it is a
good enough approximation (and the best one easily available to us)
if we want to safeguard the use of this "--promisor" logic only to
fetch client.
As to future potential mis-interaction between quarantined fetch and
the effect of this "repack local objects that can be reached by
objects in a promisor pack" feature, I do not offhand think of a
good way to future-proof it with tests.
Thanks for the discussion, both of you.
next prev parent reply other threads:[~2024-11-14 6:41 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-24 18:08 [PATCH 0/5] When fetching from a promisor remote, repack local objects referenced Jonathan Tan
2024-10-24 18:08 ` [PATCH 1/5] pack-objects: make variable non-static Jonathan Tan
2024-10-28 0:30 ` Taylor Blau
2024-10-28 19:34 ` Jonathan Tan
2024-10-28 19:50 ` Taylor Blau
2024-10-28 23:04 ` Jonathan Tan
2024-10-24 18:08 ` [PATCH 2/5] t0410: make test description clearer Jonathan Tan
2024-10-24 18:08 ` [PATCH 3/5] t0410: use from-scratch server Jonathan Tan
2024-10-24 18:08 ` [PATCH 4/5] t5300: move --window clamp test next to unclamped Jonathan Tan
2024-10-24 18:08 ` [PATCH 5/5] index-pack: repack local links into promisor packs Jonathan Tan
2024-10-30 22:29 ` Josh Steadmon
2024-11-01 20:14 ` Jonathan Tan
2024-10-25 6:04 ` [External] [PATCH 0/5] When fetching from a promisor remote, repack local objects referenced Han Young
2024-10-25 21:07 ` Taylor Blau
2024-11-02 10:38 ` Junio C Hamano
2024-10-25 21:07 ` Taylor Blau
2024-11-01 20:11 ` [PATCH v2 0/4] " Jonathan Tan
2024-11-01 20:11 ` [PATCH v2 1/4] t0410: make test description clearer Jonathan Tan
2024-11-01 20:11 ` [PATCH v2 2/4] t0410: use from-scratch server Jonathan Tan
2024-11-01 20:11 ` [PATCH v2 3/4] t5300: move --window clamp test next to unclamped Jonathan Tan
2024-11-13 7:35 ` Jeff King
2024-11-13 18:26 ` Jonathan Tan
2024-11-14 0:56 ` Jeff King
2024-11-14 6:41 ` Junio C Hamano [this message]
2024-11-15 9:52 ` Jeff King
2024-11-15 19:55 ` Jonathan Tan
2024-11-16 3:23 ` Jeff King
2024-11-18 19:02 ` [PATCH] index-pack: teach --promisor to require --stdin Jonathan Tan
2024-11-19 3:29 ` Junio C Hamano
2024-11-19 18:53 ` Jeff King
2024-11-20 1:34 ` Junio C Hamano
2024-11-19 20:10 ` [PATCH v2] index-pack: teach --promisor to forbid pack name Jonathan Tan
2024-11-20 6:29 ` Jeff King
2024-11-14 0:59 ` [PATCH v2 3/4] t5300: move --window clamp test next to unclamped Jeff King
2024-11-01 20:11 ` [PATCH v2 4/4] index-pack: repack local links into promisor packs Jonathan Tan
2024-11-04 0:22 ` [PATCH v2 0/4] When fetching from a promisor remote, repack local objects referenced Junio C Hamano
2024-11-04 2:05 ` Junio C Hamano
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqiksq71x7.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=hanyang.tony@bytedance.com \
--cc=jonathantanmy@google.com \
--cc=me@ttaylorr.com \
--cc=peff@peff.net \
--cc=steadmon@google.com \
/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 NNTP newsgroup(s).