Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/5.4' into 5.5
Browse files Browse the repository at this point in the history
  • Loading branch information
ossilator committed Mar 9, 2015
2 parents 4b962ae + ac6168c commit a5edc40
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions init-repository
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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' };
Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit a5edc40

Please sign in to comment.