Thread (3 messages) 3 messages, 2 authors, 2018-06-18

Re: fatal: could not reset submodule index

flat view

From: Stefan Beller <hidden>
Date: 2018-06-15 19:47:28

# Trying again with submodule.recurse
git config --global submodule.recurse true
git clone main clone4 cd clone4
git checkout with-submodule
# Submodule is still not automatically updated (sub folder is empty)
# It seems like submodule.recurse does not affect git clone
That is true; submodule.recurse is not affecting git clone.
This was a design decision once it was introduced, as the git clone
might be too large. Maybe we need to revisit that decision and
just clone the submodules if submodule.recurse is set.

The problem that this bug report highlights, is the following:
Each branch has its own .gitmodules file and they can be
all different, however at clone time we only clone submodules
from the currently active branch.

So you could get your test case to pass with
    git clone --branch with-submodule main clone5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help