From: Karthik Nayak Date: Wed, 23 Apr 2025 17:11:57 GMT Subject: Re: [PATCH 09/13] refs: don't fetch promisor objects in `ref_resolves_to_object()` Message-ID: In-Reply-To: <20250423-pks-object-store-cleanups-v1-9-81f8411a5d08@pks.im> Patrick Steinhardt writes: > Similar to the preceding commit, don't try to fetch objects pointed to > by references. Any reference whose object does not exist is broken by > definition an, so we should report it accordingly. > s/an// > Signed-off-by: Patrick Steinhardt > --- > refs.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/refs.c b/refs.c > index 6559db37890..0492cf0d13a 100644 > --- a/refs.c > +++ b/refs.c > @@ -376,7 +376,7 @@ int ref_resolves_to_object(const char *refname, > { > if (flags & REF_ISBROKEN) > return 0; > - if (!repo_has_object_file(repo, oid)) { > + if (!has_object(repo, oid, HAS_OBJECT_RECHECK_PACKED)) { > error(_("%s does not point to a valid object!"), refname); > return 0; > } > > -- > 2.49.0.901.g37484f566f.dirty