init-repository: Make sure that we update a submodule before we recurse

Unless we do so, doing git submodule init in a submodule would use the
currently checked out version of its .gitmodule instead of the one of
its pinned SHA1.

Change-Id: I88de421c8d24748dcaa5334c82da2aac4b12b2ad
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
This commit is contained in:
Jocelyn Turcotte
2014-08-13 21:50:53 +02:00
parent 8801fd0258
commit ce45f45dfb

View File

@@ -475,6 +475,7 @@ sub git_clone_all_submodules
if ($line =~ /submodule\.([^.=]+)\.url=(.*)/) {
$self->git_clone_one_submodule($1, $2);
if ($1 eq "qtwebengine") {
$self->exe('git', 'submodule', 'update', $1);
chdir($1) or confess "chdir $1: $OS_ERROR";
$self->exe('git', 'submodule', 'init');
$self->git_clone_all_submodules;