I have a main repo with 4 submodules:
- kvm
- libvmi
- qemu
- nitro
and I would like to sparse-checkout
kvm
, to filter out a few annoying files that are not comptabile with filesystem limitations on Windows
(AUX
is a reserved filename, and kvm tree contains aux.{h|c}
)
I understand how to do a sparse-checkout
on a normal repository, but when I do the same on a submodule, it doesn't work, the .git/modules
directory is missing:
git clone https://github.com/KVM-VMI/kvm-vmi/
git -C kvm config core.sparseCheckout true
echo "!drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.*" >> .git/modules/kvm/info/sparse-checkout # ignore aux.*
echo "/*" >> .git/modules/kvm/info/sparse-checkout # checkout everything else
git submodule update --init
The first echo
command will fail because the .git/modules
hasn't been created.
I don't know who is responsible for creating this directory.
Am I missing an "init
" command somewhere ?
Note:
I have been looking for solutions on Stackoverflow, or from blog posts:
but they don't work for me because I don't want to clone a separate kvm
repo and later on add it to my main repo.
Thanks.