mirror of
git://code.qt.io/qt/qt5.git
synced 2026-02-01 19:36:04 +08:00
properly recurse submodule initialization
Change-Id: Icd438b9da9af0275dd508186a265bc211d9d01ce Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
This commit is contained in:
@@ -352,7 +352,7 @@ sub git_clone_all_submodules
|
||||
|
||||
my @modules = sort keys %include;
|
||||
|
||||
$self->git_submodule_init(@modules);
|
||||
$self->git_submodule_init(map { $subdirs{$_} } @modules);
|
||||
|
||||
# manually clone each repo here, so we can easily use reference repos, mirrors etc
|
||||
my @configresult = qx(git config -l);
|
||||
@@ -373,18 +373,19 @@ sub git_clone_all_submodules
|
||||
|
||||
foreach my $module (@modules) {
|
||||
$self->git_clone_one_submodule($subdirs{$module}, $subbases{$module});
|
||||
if ($module eq "qtwebengine") {
|
||||
$self->exe('git', 'submodule', 'update', $module);
|
||||
my $orig_cwd = getcwd();
|
||||
chdir($module) or confess "chdir $module: $OS_ERROR";
|
||||
$self->exe('git', 'submodule', 'init');
|
||||
$self->git_clone_all_submodules($subbases{$module}, "all");
|
||||
chdir("$orig_cwd") or confess "chdir $orig_cwd: $OS_ERROR";
|
||||
}
|
||||
}
|
||||
|
||||
if ($self->{update}) {
|
||||
$self->exe('git', 'submodule', 'update', '--recursive');
|
||||
$self->exe('git', 'submodule', 'update');
|
||||
|
||||
foreach my $module (@modules) {
|
||||
if (-f $module.'/.gitmodules') {
|
||||
my $orig_cwd = getcwd();
|
||||
chdir($module) or confess "chdir $module: $OS_ERROR";
|
||||
$self->git_clone_all_submodules($subbases{$module}, "all");
|
||||
chdir("$orig_cwd") or confess "chdir $orig_cwd: $OS_ERROR";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user