]> git.ipfire.org Git - thirdparty/git.git/commit
object-store: allow fetching objects via `has_object()`
authorPatrick Steinhardt <ps@pks.im>
Tue, 29 Apr 2025 07:52:19 +0000 (09:52 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 29 Apr 2025 17:08:13 +0000 (10:08 -0700)
commitf8fc4cacd37afa254a8822258f76de53ae2dfbb2
tree9af99cedd8587e19db6d968bb19ac996b8078456
parent1a793261c53507f7c46f748cc76378a9c5bb05cf
object-store: allow fetching objects via `has_object()`

We're about to fully remove `repo_has_object_file()` in favor of
`has_object()`. The latter function does not yet have a way to fetch
missing objects via a promisor remote though, which means that it cannot
fully replace all usecases of `repo_has_object_file()`.

Introduce a new flag `HAS_OBJECT_FETCH_PROMISOR` that causes the
function to optionally fetch missing objects which are part of a
promisor pack. This flag will be used in the subsequent commit.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
object-store.c
object-store.h