Subject: Re: [PATCH v2 10/13] http-walker: don't fetch objects via promisor remotes

From: Junio C Hamano <[email-masked]>
Date: Mon, 28 Apr 2025 14:56:01 -0700

Patrick Steinhardt <[email-masked]> writes:

> The HTTP walker is responsible for fetching objects via the dumb HTTP
> protocol. To avoid re-fetching objects that we already have locally we
> first check whether the object already exists in the local repository
> before issuing the requests.
>
> This existence check is done by calling `repo_has_object_file()`, which
> will fetch the object via a promisor remote in case it is in a promisor
> pack. This fetch does not make any sense for us though: we're already in
> the process of fetching the object anyway, so fetching it via a separate
> connection is wasteful, but should otherwise be harmless.

This rationale does make sense for this code path.  It half matches
the rationale of omitting the collision check when you see an object
in the pack stream being indexed that it can also be obtained from
your promisor remotes, which was of dubious validity, but in this
case it makes perfect sense.

Thanks.