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

Re: [PATCH] fetch-pack: avoid packing reachable objects.

From
Junio C Hamano <junkio@cox.net>
Date
Oct 26, 2005, 05:07 UTC
Message-ID
<7v7jc0c1ds.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20051026042632.GA3059@delft.aura.cs.cmu.edu>
Jan Harkes <jaharkes@cs.cmu.edu> writes:
> Mark remote commits that were found in the alternate repository as
> COMPLETE and avoid unnecessary packing of already available objects.

Sorry, this is wrong (we made this mistake twice already). The mere existence of that object in the local repository does not necessarily mean we have everything that is reachable from it.

The rule is that we only trust local refs. Anything that are reachable from them are known to be complete. And after a successful fetch, we update local refs. The existence of an object is a strong _hint_ that it _might_ be complete, but nothing more.

Think of a case where you tried to fetch via commit walker and got things reachable from the then-current ref, and the object you are marking as COMPLETE (maybe in pack) is a remnant of that failed fetch, which was killed before completing. You might have complete history starting from the then-current commit back to that commit, but there is no guarantee that you can further tangle the history back and find everything needed.

Previous: Jan Harkes
Message 2 of 2 in “fetch-pack: avoid packing reachable objects.”
  1. fetch-pack: avoid packing reachable objects.Jan Harkes, Oct 26, 2005
  2. Junio C HamanoOct 26, 2005

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.