Thread (7 messages) flat view 7 messages, 3 authors, 2016-06-15

Re: Issue 323 in msysgit: Can't clone over http

From: Tay Ray Chuan <hidden>
Date: 2016-06-15 22:47:23

Possibly related (same subject, not in this thread)

Hi,

On Fri, Sep 11, 2009 at 4:54 PM, Junio C Hamano [off-list ref] 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help