# git submodule ignores sparse-checkout?

1 messages from 2026-07-16 to 2026-07-16. Participants: Brad Larson.
Thread: https://gitlist.dev/t/66024

## Brad Larson, 2026-07-16 19:47

Subject: git submodule ignores sparse-checkout?
Message-ID: <CAJ5prAm+t2pVGjfqqU6c9aASYf7sa-jpxG8v5rezJNYx__xaWw@mail.gmail.com>

```
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

```
