git://git.qt-users.jp
/
mirror
/
qt
/
qt5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix cloning of tagged versions
[mirror/qt/qt5.git]
/
init-repository
diff --git
a/init-repository
b/init-repository
index
954237d
..
f7ba27e
100755
(executable)
--- a/
init-repository
+++ b/
init-repository
@@
-389,7
+389,8
@@
sub git_clone_all_submodules
}
foreach my $module (@modules) {
}
foreach my $module (@modules) {
- $self->git_clone_one_submodule($subdirs{$module}, $subbases{$module}, $subbranches{$module});
+ $self->git_clone_one_submodule($subdirs{$module}, $subbases{$module},
+ $co_branch && $subbranches{$module});
}
if ($co_branch) {
}
if ($co_branch) {
@@
-482,7
+483,11
@@
sub git_clone_one_submodule
my $do_clone = (! -e "$submodule/.git");
if ($do_clone) {
my $do_clone = (! -e "$submodule/.git");
if ($do_clone) {
- push @reference_args, '--branch', $branch if ($branch);
+ if ($branch) {
+ push @reference_args, '--branch', $branch;
+ } else {
+ push @reference_args, '--no-checkout';
+ }
$self->exe('git', 'clone', @reference_args,
($mirror ? $mirror : $url), $submodule);
}
$self->exe('git', 'clone', @reference_args,
($mirror ? $mirror : $url), $submodule);
}