Avoid cargo cloning git submodules

I have a git dependency:

foo = { git = "https://github.com/..." }

Within the repository is a git submodule containing a large amount of local testing data and is not necessary for the dependency.

Is there a way to tell cargo to not clone the submodules?

There is an open issue, which seems to have stalled? Is there a way to skip some submodules? · Issue #4247 · rust-lang/cargo · GitHub