{"thread":{"id":"66024","subject":"git submodule ignores sparse-checkout?","startedAt":"2026-07-16T19:47:59Z","lastAt":"2026-07-16T19:47:59Z","messageCount":1,"participants":["Brad Larson"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"548450","messageId":"CAJ5prAm+t2pVGjfqqU6c9aASYf7sa-jpxG8v5rezJNYx__xaWw@mail.gmail.com","threadId":"66024","inReplyTo":null,"subject":"git submodule ignores sparse-checkout?","fromName":"Brad Larson","fromEmail":"bklarson@gmail.com","sentAt":"2026-07-16T19:47:42Z","receivedAt":"2026-07-16T19:47:59Z","isPatch":false,"body":"I feel like this is incorrect.  Curious if others agree.\n\nsparse-checkout is fantastic for working in a subset of a large\nrepository.  But if that repository also happens to use git\nsubmodules, the sparse checkout configuration is ignored during\nsubmodule updates.\n\ngit 2.55.0, built from e9019fcafe00\nSteps to reproduce (I chose rust - it has a lot of submodules) :\n\n$ git clone --filter=blob:none --no-checkout\nhttps://github.com/rust-lang/rust.git\n$ cd rust\n$ git sparse-checkout set src/doc\n$ git checkout main\n(notice how we only have src/doc populated)\n$ git submodule update --init\n(initializes repositories in library/ and src/tools)\n\nI think it would make sense for git submodule to only interact with\nthe set of directories in the sparse checkout configuration.  Would\nthe maintainers be open to a commit which improves this behavior?\n\nThank you,\nBrad\n"}]}