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

Partial-cloning or filtering a submodule

From
Petar Vutov <pvutov@imap.cc>
Date
Aug 7, 2025, 11:34 UTC
Message-ID
<b3dfaa93-fdd7-4be4-8b5b-f453146d6c14@app.fastmail.com>
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?
Message 1 of 1 in “Partial-cloning or filtering a submodule”
  1. Petar VutovAug 7, 2025

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.