Volume XXII, number 279Tuesday, October 6, 2026Latest message 40 minutes ago

The Git List

News and archive of git@vger.kernel.org, since April 2005

git submodule ignores sparse-checkout?

1 messages between Jul 16, 2026 and Jul 16, 2026, from Brad Larson.

Plain Markdown or JSON for tools and agents.

Brad LarsonJul 16, 2026, 19:47 UTC on lore
I feel like this is incorrect.  Curious if others agree.

sparse-checkout is fantastic for working in a subset of a large repository. But if that repository also happens to use git submodules, the sparse checkout configuration is ignored during submodule updates.

git 2.55.0, built from e9019fcafe00 Steps to reproduce (I chose rust - it has a lot of submodules) :

$ git clone --filter=blob:none --no-checkout https://github.com/rust-lang/rust.git $ cd rust $ git sparse-checkout set src/doc $ git checkout main (notice how we only have src/doc populated) $ git submodule update --init (initializes repositories in library/ and src/tools)

I think it would make sense for git submodule to only interact with the set of directories in the sparse checkout configuration. Would the maintainers be open to a commit which improves this behavior?

Thank you, Brad

Back to recent threads