From: Tay Ray Chuan Date: Sat, 12 Sep 2009 10:01:06 GMT Subject: Re: Issue 323 in msysgit: Can't clone over http Message-ID: In-Reply-To: <7veiqdzwrk.fsf@alter.siamese.dyndns.org> Hi, On Fri, Sep 11, 2009 at 4:54 PM, Junio C Hamano wrote: >  - You fetch, and the walker walks the loose objects, and then finds one >   object that cannot be obtained as a loose object.  It tries to look up >   in the *.idx file and finds it in B. > >   But the packfile B is long gone. > > I didn't follow the codepath that uses http_get_info_packs() and then uses > repo->packs list to see what it does, but as long as the above does not > happen we should be Ok. To determine which pack to get when fetching an object, http-walker.c does not refer to the *.idx files git already has (that is, those found locally). Instead, it builds a list of *.idx files (repo->packs or walker->data->alt->packs) from the remote's objects/info/packs, and uses that. So even if the *.idx file for pack B was downloaded from a previous fetch, it won't be used at all. Therefore, your concern (over fetching a non-existent pack) won't play out, unless the server does a repack -a, but forgets to update the pack list (at objects/info/packs). PS. The above was solely based on my reading of the code, no testing done. -- Cheers, Ray Chuan