aboutsummaryrefslogtreecommitdiffstats
path: root/init-repository
diff options
context:
space:
mode:
authorJocelyn Turcotte <jocelyn.turcotte@digia.com>2014-08-15 17:37:02 +0200
committerJocelyn Turcotte <jocelyn.turcotte@digia.com>2014-09-10 18:24:13 +0200
commit1ae06898295d6a045f459702e91d9ab4c61a7b0a (patch)
treeb3a26d19bba132dddabe834f6b3837f8509bf7af /init-repository
parent5fdb4490cb85b3470bdbd81de9dccbe6bcb96460 (diff)
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>
Diffstat (limited to 'init-repository')
-rwxr-xr-xinit-repository2
1 files changed, 1 insertions, 1 deletions
diff --git a/init-repository b/init-repository
index 6f02a142..f449ddd4 100755
--- a/init-repository
+++ b/init-repository
@@ -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);
}