mirror of
git://code.qt.io/qt/qt5.git
synced 2026-02-02 03:36:54 +08:00
init-repository: Support cases where $submodule/.git is a file
Since git 1.7.8 the $GIT_DIR of the submodule can be a reference to the super-module's $GIT_DIR/modules/<name>/ Test for existence instead of testing for a directory before attempting a git clone there. Change-Id: Ic539e770067da1417a2ad374c21253212473abe6 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
This commit is contained in:
@@ -559,7 +559,7 @@ sub git_clone_one_submodule
|
||||
}
|
||||
}
|
||||
|
||||
my $do_clone = (! -d "$submodule/.git");
|
||||
my $do_clone = (! -e "$submodule/.git");
|
||||
if ($do_clone) {
|
||||
$self->exe('git', 'clone', @reference_args, ($mirror ? $mirror : $url), $submodule);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user