git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Tay Ray Chuan <rctay89@gmail.com>
Date
Sep 12, 2009, 10:01 UTC
Message-ID
<be6fef0d0909120301r79072d5ase0d4b174753af9b5@mail.gmail.com>
In-Reply-To
<7veiqdzwrk.fsf@alter.siamese.dyndns.org>
Hi,
On Fri, Sep 11, 2009 at 4:54 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 9 quoted lines
>  - 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
Previous: Junio C HamanoNext: Junio C Hamano
Message 15 of 16 in “Re: Issue 323 in msysgit: Can't clone over http”
  1. Junio C HamanoSep 4, 2009
  2. Tay Ray ChuanSep 4, 2009
  3. Junio C HamanoSep 7, 2009
  4. Tay Ray ChuanSep 7, 2009
  5. Junio C HamanoSep 7, 2009
  6. Junio C HamanoSep 7, 2009
  7. Tay Ray ChuanSep 7, 2009
  8. Junio C HamanoSep 7, 2009
  9. Jakub NarebskiSep 8, 2009
  10. Tay Ray ChuanSep 8, 2009
  11. Tay Ray ChuanSep 8, 2009
  12. Tay Ray ChuanSep 9, 2009
  13. Junio C HamanoSep 9, 2009
  14. Junio C HamanoSep 11, 2009
  15. Tay Ray ChuanSep 12, 2009
  16. Junio C HamanoSep 12, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.