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

Re: [PATCH 0/2] Slightly simplify partial clone user experience

From
Jeff King <peff@peff.net>
Date
Mar 22, 2020, 19:22 UTC
Message-ID
<20200322192234.GC671552@coredump.intra.peff.net>
In-Reply-To
<5baf9f4c-9ce0-0384-1113-431038c2a646@gmail.com>
On Sun, Mar 22, 2020 at 12:45:29PM -0400, Derrick Stolee wrote:
Show 14 quoted lines
> >> I have mixed feelings on this. I do like making things less arcane for
> >> users. But are we locking in a behavior for --partial that we might not
> >> want to live with forever? I.e., the current thinking for partial clones
> >> is to fetch no blobs at all, get all commits and trees, apply sparse
> >> filters, and then fault in the blobs we need. But imagine we later grow
> >> the ability to easily avoid fetching all of the trees. Would we regret
> >> having the simple name "--partial" taken?
> > 
> > I agree with that. Something like "--filter-blobs" for
> > "--filter=blob:none" and perhaps "--filter-blobs=<size>" for
> > "--filter=blob:limit=<size>" might be worth it though.
> 
> Thanks for the perspective on this. The --filter-blobs[=<size>] should
> be less likely to collide with an alternative definition of "partial".

Yes, though I wonder if it's really that big an improvement over "--filter=blob:none".

Show 10 quoted lines
> While we are thinking in this space, what if we had a "partial-clone"
> builtin? It could be a light wrapper around "git clone" where
> 
>   git partial-clone [--limit=<size>] [options] <url> [<dir>]
> 
> would do the same thing as
> 
>   git clone --filter=blob:[none|limit=<size>] [options] <url> [<dir>]
> 
> Just spit-balling here.

I think that just shifts my concern out to the other command; i.e., would we later want the partial-clone command to behave differently. And introducing a wrapper creates a weird non-orthogonality where it's not necessary. I _do_ think a wrapper could make sense when it's doing substantially different things, or multiple steps that don't belong in the original program (e.g., the way Scalar works).

> In the meantime, I'll work to adjust my patches to only be the
> documentation of the --filter option.
Thanks, that seems like an obvious and easy improvement.
-Peff
Previous: Derrick StoleeNext: Taylor Blau
Message 11 of 15 in “Slightly simplify partial clone user experience”
  1. 0/2 Slightly simplify partial clone user experienceDerrick Stolee via GitGitGadget, Mar 19, 2020
  2. 1/2 partial-clone: set default filter with --partialDerrick Stolee via GitGitGadget, Mar 19, 2020
  3. Junio C HamanoMar 20, 2020
  4. Derrick StoleeMar 20, 2020
  5. Jeff KingMar 22, 2020
  6. 2/2 clone: document --partial and --filter optionsDerrick Stolee via GitGitGadget, Mar 19, 2020
  7. Derrick StoleeMar 20, 2020
  8. Jeff KingMar 22, 2020
  9. Christian CouderMar 22, 2020
  10. Derrick StoleeMar 22, 2020
  11. Jeff KingMar 22, 2020
  12. Taylor BlauMar 22, 2020
  13. clone: document --filter optionsDerrick Stolee via GitGitGadget, Mar 22, 2020
  14. Jeff KingMar 24, 2020
  15. Jonathan NiederMar 24, 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.