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

Re: [PATCH] partial-clone: design doc

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 12, 2017, 23:57 UTC
Message-ID
<xmqqlgi7xzwq.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<46D2661C19CD4ADE81699FE7E99712EE@PhilipOakley>
"Philip Oakley" <philipoakley@iee.org> writes:
Show 8 quoted lines
>> +  These filtered packfiles are incomplete in the traditional sense
>> because
>> +  they may contain trees that reference blobs that the client does
>> not have.
>
> Is a comment needed here noting that currently, IIUC, the complete
> trees are fetched in the packfiles, it's just the un-necessary blobs
> that are omitted ?

I probably am misreading what you meant to say, but the above statement with "currently" taken literally to mean the system without JeffH's changes, is false.

When the receiver says it has commit A and the sender wants to send a commit B (because the receiver said it does not have it, and it wants it), trees in A are not sent in the pack the sender sends to give objects sufficient to complete B, which the receiver wanted to have, even if B also has those trees. If you fetch from me twice and between that time Documentation/ directory did not change, the second fetch will not have the tree object that corresponds to that hierarchy (and of course no blobs and sub trees inside it).

So "the complete trees are fetched" is not true. What is true (and what matters more in JeffH's document) is that fetching is done in such a way that objects resulting in the receiving repository are complete in the current system that does not allow promised objects. If some objects resulting in the receiving repository are incomplete, the current system considers that we corrupted the repository.

The promise mechanism says that it is fine for the receiving end to lack blobs, trees or commits, as long as the promisor repository tells it that these "missing" objects can be obtained from it later. The way the receiving end which notices that it does not have an otherwise required blob, tree or commit is one promised by the promisor repository is to see if it is referenced by a pack that came from such a promisor repository.

Previous: Philip OakleyNext: Philip Oakley
Message 6 of 9 in “Partial clone design document”
  1. Partial clone design documentJeff Hostetler, Dec 8, 2017
  2. partial-clone: design docJeff Hostetler, Dec 8, 2017
  3. Junio C HamanoDec 8, 2017
  4. Jeff HostetlerDec 13, 2017
  5. Philip OakleyDec 12, 2017
  6. Junio C HamanoDec 12, 2017
  7. Philip OakleyDec 13, 2017
  8. Jeff HostetlerDec 14, 2017
  9. Jeff HostetlerDec 14, 2017

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.