Sync submodule recursively

Submodule may have its own submodules, and the sub-sub-module url may be
changed.
Thus, if `submodule update --recursive` is done without url sync,
sub-sub-module may fail to find appropriate commit.
This patch fixes the problem by `git submodule update` locally
before recursive sync.
This commit is contained in:
klutzy 2013-03-16 22:05:07 +09:00
parent 5f672775b2
commit 14d6babd88

8
configure vendored
View file

@ -368,6 +368,14 @@ then
"${CFG_GIT}" submodule status --recursive
msg "git: submodule update"
"${CFG_GIT}" submodule --quiet update --init
need_ok "git failed"
msg "git: submodule foreach sync"
"${CFG_GIT}" submodule --quiet foreach --recursive 'if test -e .gitmodules; then git submodule sync; fi'
need_ok "git failed"
msg "git: submodule foreach update"
"${CFG_GIT}" submodule --quiet update --init --recursive
need_ok "git failed"