From 14d6babd88ede227c3293a4f5bc363325e527534 Mon Sep 17 00:00:00 2001 From: klutzy Date: Sat, 16 Mar 2013 22:05:07 +0900 Subject: [PATCH] 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. --- configure | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/configure b/configure index 0103ae80fa35..f035ad7f3ad9 100755 --- a/configure +++ b/configure @@ -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"