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

Re: Cloning from sites with 404 overridden

From
Junio C Hamano <junkio@cox.net>
Date
Mar 22, 2006, 06:47 UTC
Message-ID
<7v1wwvascr.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<e5bfff550603212206k1924d352xcbdb0e5a11b88a50@mail.gmail.com>
"Marco Costalba" <mcostalba@gmail.com> writes:
Show 6 quoted lines
> Perhaps I am proposing a total idiocy, I don't know git-fetch
> internals, but wouldn't be better to avoid trying to download a non
> existing object? So to fix the problem at the origin?
>
> I don't know if it is possible to list contents before try to download
> so to avoid asking for a non existing object.

There is no way for the downloader to know if the upstream repository has packed which object. What is happening is that the commit walker asks for loose object first because it does not know. Upon getting a "no such file" (or in the case of misconfigured HTTP server that does not say 404, "corrupt object"), it then checks if the object appears in the pack by downloading the pack index. It can tell what objects are in the packs by looking at the pack index and downloads the pack that contains needed object.

Previous: Marco CostalbaNext: Andreas Ericsson
Message 5 of 18 in “Re: Cloning from sites with 404 overridden”
  1. linux@horizon.comMar 22, 2006
  2. Shawn PearceMar 22, 2006
  3. Linus TorvaldsMar 22, 2006
  4. Marco CostalbaMar 22, 2006
  5. Junio C HamanoMar 22, 2006
  6. Andreas EricssonMar 22, 2006
  7. Mark WoodingMar 24, 2006
  8. Junio C HamanoMar 24, 2006
  9. Linus TorvaldsMar 24, 2006
  10. Morten WelinderMar 24, 2006
  11. Andreas EricssonMar 24, 2006
  12. Nick HengeveldMar 22, 2006
  13. Nick HengeveldMar 22, 2006
  14. Junio C HamanoMar 22, 2006
  15. Junio C HamanoMar 22, 2006
  16. Nick HengeveldMar 23, 2006
  17. Junio C HamanoMar 23, 2006
  18. Radoslaw SzkodzinskiMar 22, 2006

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.