Partial-cloning or filtering a submodule

From: Petar Vutov <hidden>
Date: 2025-08-07 11:34:48

When adding a submodule, I usually only need part of the submodule repository.

As far as I know there is currently no support for partial-cloning submodules. Before I try my hand at this, I want to ask if it makes sense as a feature.

I imagine it like this: 
* new `submodule.<name>.filter` field in .gitmodules
* on `submodule update`, the plumbing described at https://git-scm.com/docs/partial-clone is used to filter the specified paths
* if we do `submodule update --recursive`, submodules excluded by the filter-spec are not filled in, maybe they also don't show up in `git submodule status --recursive` etc

Thoughts?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help