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

Re: [RFC PATCH] fetch-pack: lazy fetch using tree:0

From
Taylor Blau <me@ttaylorr.com>
Date
Mar 26, 2020, 19:50 UTC
Message-ID
<20200326195058.GA8613@syl.local>
In-Reply-To
<20200320061214.GA511478@coredump.intra.peff.net>
Hi Peff,
On Fri, Mar 20, 2020 at 02:12:14AM -0400, Jeff King wrote:
Show 12 quoted lines
> On Thu, Mar 19, 2020 at 10:44:39AM -0700, Jonathan Tan wrote:
> >  - Some hosts like GitHub support some partial clone filters, but not
> >    "tree:0".
>
> Yes, this is going to fail against GitHub servers, just like it would
> for older servers. One way to prevent that would be to use a "blob"
> filter if that's what we originally partial-cloned with. I don't know if
> that information always reliably makes it into this code path, though.
> I think I'd prefer a capability-based fix in the long run.
>
> We may support "tree:0" eventually at GitHub. It's quick to compute with
> bitmaps, just like "blob:none" is. But "tree:1" isn't.
I'm rolling this out shortly :).
Show 5 quoted lines
> One side note (for Taylor, cc'd): our patches elsewhere to limit the
> allowed filters don't make it possible to express the difference between
> "tree:0" and "tree:1". It may be worth thinking about that, especially
> if it influences the config schema (since we'll have to support it
> forever once it makes it into a release).

They do now, mostly thanks to Peff's original thinking about separating out each filter choice into its own subsection, so that we can write not just:

  [uploadpack "filter.tree:depth"]
    allow = true
but also:
  [uploadpack "filter.tree:depth"]
    allow = true
    maxDepth = <n>

I have some patches that I'm rolling out to GitHub in the next day or so that do just that. I think that we will likely just support the no-trees version of this filter (i.e., '--filter=tree:0'), since that is the only case that is helped by having up-to-date bitmaps enabled. I assume that other administrators will do the same.

I'm going to send these patches upstream in the not-too-distant future, because I want to address the original issues that I talked about in my RFC about adding these filter subsections to 'upload-pack's configuration in the first place in [1].

My hope is that I can do that while these patches are being vetted in the wild before I send them to the list.

Thanks, Taylor

[1]: https://lore.kernel.org/git/cover.1584477196.git.me@ttaylorr.com/
Previous: Jeff KingNext: Jeff King
Message 4 of 5 in “fetch-pack: lazy fetch using tree:0”
  1. fetch-pack: lazy fetch using tree:0Jonathan Tan, Mar 19, 2020
  2. Derrick StoleeMar 19, 2020
  3. Jeff KingMar 20, 2020
  4. Taylor BlauMar 26, 2020
  5. Jeff KingMar 27, 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.