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

Re: Questions about partial clone with '--filter=tree:0'

From
AMAlexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>
Date
Oct 21, 2020, 17:46 UTC
Message-ID
<67a5edc8-d2f3-735a-fc7c-0fb1b93a7cf3@syntevo.com>
In-Reply-To
<20201021173153.GC1237181@nand.local>
On 21.10.2020 19:31, Taylor Blau wrote:
 > If you have a promisor remote which is missing objects, running
 > 'git blame' etc. will transparently download whatever objects it
 > is missing.

This is correct, but it downloads things one at a time, which in case of larger repo such as Linux could take weeks to complete. And downloading more things at once isn't easy without the suggested command.

It is possible to traverse commit graph, requesting all discovered objects at once, but again in case of Linux, that would mean sending multiple requests with lists of 1 million+ oids. And the number of requests is around the maximum tree depth. Doesn't sound nice.

> Jonathan Tan knows better than I do here. Maybe he could chime in.
I already CC'ed him, I hope he finds time to reply.
Show 5 quoted lines
> I see what you're saying. Here sparse-checkout and partial clones
> confusingly diverge: what you really want is to say "I want all of the
> objects that I need to construct this directory at any point in history"
> so that you can run "git blame" on some path within that directory
> without the need for a follow-up fetch.
Right.
> In any case the '--filter=sparse:<oid>' bit is not recommended for use,
> but perhaps this is a convincing use-case. I didn't follow the partial
> clone development close enough to know whether this has already been
> discussed, but I'm sure that it has.

Unfortunately '--filter=sparse:<oid>' requires the list to be already committed on server, which limits the usefulness of it a lot.

Previous: Taylor BlauNext: Jonathan Tan
Message 5 of 9 in “Questions about partial clone with '--filter=tree:0'”
  1. Alexandr MiloslavskiyOct 20, 2020
  2. Taylor BlauOct 20, 2020
  3. Alexandr MiloslavskiyOct 21, 2020
  4. Taylor BlauOct 21, 2020
  5. Alexandr MiloslavskiyOct 21, 2020
  6. Jonathan TanOct 26, 2020
  7. Alexandr MiloslavskiyOct 26, 2020
  8. Jonathan TanOct 26, 2020
  9. Alexandr MiloslavskiyOct 26, 2020

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.