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

Re: [PATCH] clone, submodule: pass partial clone filters to submodules

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 26, 2022, 06:03 UTC
Message-ID
<xmqqilu7t4nm.fsf@gitster.g>
In-Reply-To
<CABPp-BE2B9NkWG8bWft6m-UOg66aRpjwSRTWvAyrKCiwJCemHQ@mail.gmail.com>
Elijah Newren <newren@gmail.com> writes:
Show 6 quoted lines
> But how would that interact with this patch?  There's a bit of a
> conflict.  There's a few ways out:
>   * Make your change be explicit rather than implicit: Based on
> Junio's first concern, you could modify this patch so that it requires
> a new flag like --filter-submodules-too (or some better name), and
> perhaps folks with a path filter just wouldn't use that.

I would very much prefer this, given that this is a change of default proposed by those who want a different default than the status quo, even without the "how would we know it is sensible to just pass down any and all filters?" issue.

>   * Make these incompatible: Maybe a path filter is incompatible with
> --recurse-submodules, and we should throw an error if both are
> specified.

Perhaps. Or automatically filter out such an incompatible ones, but of course, that would mean submodules are made less filtered than top-level which is usually the other way around.

Show 6 quoted lines
>   * Attempt to marry the two options: Each submodule could perhaps
> extract the subset of paths with itself as a leading directory and
> remove that leading prefix and then use that as the path portion of
> the filter.  (And perhaps even taking this a step farther: each level
> of cloning will only recurse into submodules which match the specified
> paths).

Yup, for some filters, passing them down may have a "natural" translation, similar to adding the prefix to a pathspec element. It would probably depend on the filter if there is such a natural translation even exists, though.

Previous: Elijah NewrenNext: Josh Steadmon
Message 4 of 14 in “clone, submodule: pass partial clone filters to submodules”
  1. clone, submodule: pass partial clone filters to submodulesJosh Steadmon, Jan 21, 2022
  2. Junio C HamanoJan 22, 2022
  3. Elijah NewrenJan 25, 2022
  4. Junio C HamanoJan 26, 2022
  5. Josh SteadmonFeb 1, 2022
  6. Elijah NewrenJan 25, 2022
  7. Josh SteadmonFeb 1, 2022
  8. clone, submodule: pass partial clone filters to submodulesJosh Steadmon, Feb 5, 2022
  9. Josh SteadmonFeb 5, 2022
  10. Josh SteadmonFeb 5, 2022
  11. clone, submodule: pass partial clone filters to submodulesJosh Steadmon, Feb 5, 2022
  12. Jonathan TanFeb 9, 2022
  13. Junio C HamanoFeb 9, 2022
  14. t5617,t7814: remove unnecessary 'uploadpack.allowanysha1inwant'Philippe Blain, Feb 19, 2022

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.