From 1ae06898295d6a045f459702e91d9ab4c61a7b0a Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Fri, 15 Aug 2014 17:37:02 +0200 Subject: 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// Test for existence instead of testing for a directory before attempting a git clone there. Change-Id: Ic539e770067da1417a2ad374c21253212473abe6 Reviewed-by: Frederik Gladhorn Reviewed-by: Oswald Buddenhagen --- init-repository | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- cgit v1.2.3