From: Patrick Steinhardt Date: Fri, 21 Nov 2025 06:33:01 GMT Subject: Re: [PATCH 11/18] packfile: introduce function to read object info from a store Message-ID: In-Reply-To: On Wed, Nov 19, 2025 at 02:48:24PM +0000, Karthik Nayak wrote: > Patrick Steinhardt writes: > > diff --git a/odb.c b/odb.c > > index 3ec21ef24e..f4cbee4b04 100644 > > --- a/odb.c > > +++ b/odb.c > > @@ -702,8 +700,8 @@ static int do_oid_object_info_extended(struct object_database *odb, > > while (1) { > > struct odb_source *source; > > > > - if (find_pack_entry(odb->repo, real, &e)) > > - break; > > + if (!packfile_store_read_object_info(odb->packfiles, real, oi, flags)) > > + return 0; > > > > Earlier we would try to find the pack entry and if we did, we would > break this `while` loop and fill in the object information. Now that is > part of the `packfile_store_read_object_info()` function. So we simply > have to loop until it returns a success. > > Speaking of which, the loop simply exists to capture: > 1. Trying to read objects from a submodule, so we add the submodule > sources and try everything again > 2. If its a promisor remote, we try to fetch and try everything again. Exactly. The loop will be changed somewhat to also handle the ODB sources. But that will be part of a later patch series that moves the packfile store into the ODB source. Patrick