summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2015-03-09 12:28:37 +0100
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2015-03-09 12:28:37 +0100
commita5edc40176e7b40e24c2c8ae6958005e8c461ee2 (patch)
treed04cd304de401ad100c9a36babbf021c32905b47
parent4b962aee8260f4cb709eae2534bc13785fcc2712 (diff)
parentac6168c0cb00b32a644509645cb77e33470c4e2c (diff)
Merge remote-tracking branch 'origin/5.4' into 5.5
-rwxr-xr-xinit-repository7
1 files changed, 4 insertions, 3 deletions
diff --git a/init-repository b/init-repository
index 0061de4d..46456e9d 100755
--- a/init-repository
+++ b/init-repository
@@ -375,7 +375,7 @@ sub git_clone_all_submodules
}
foreach my $module (@modules) {
- $self->git_clone_one_submodule($subdirs{$module}, $subbases{$module});
+ $self->git_clone_one_submodule($subdirs{$module}, $subbases{$module}, $subbranches{$module});
}
if ($co_branch) {
@@ -432,7 +432,7 @@ sub git_add_remotes
sub git_clone_one_submodule
{
- my ($self, $submodule, $repo_basename) = @_;
+ my ($self, $submodule, $repo_basename, $branch) = @_;
my $alternates = $self->{ 'alternates' };
my $mirror_url = $self->{ 'mirror-url' };
@@ -468,7 +468,8 @@ sub git_clone_one_submodule
my $do_clone = (! -e "$submodule/.git");
if ($do_clone) {
- $self->exe('git', 'clone', '--no-checkout', @reference_args,
+ push @reference_args, '--branch', $branch if ($branch);
+ $self->exe('git', 'clone', @reference_args,
($mirror ? $mirror : $url), $submodule);
}