Add submodule specifying depth and branch at the same time won't work
- From
Carlos Pita <carlosjosepita@gmail.com>
- Date
- Oct 12, 2015, 19:48 UTC
- Message-ID
- <CAELgYhcmzDEVRH9neGwZeqVBduL-nb=d+XoSMwRGKpmLUeX83g@mail.gmail.com>
For example, I can do:
git clone --depth 1 --branch devel git@gitlab.com:memeplex/bash.git
But if I try:
git submodule add --depth 1 -b devel git@gitlab.com:memeplex/bash.git
I get:
fatal: Cannot update paths and switch to branch 'devel' at the same time. Did you intend to checkout 'origin/devel' which can not be resolved as commit? Unable to checkout submodule 'src/aur/bash'
I think the devel branch is left outside the update because depth is just 1, but then the same could be said for the clone, which just works. The request should be interpreted as depth 1 inside devel branch.