fix --branch without --no-update

clearly, i botched the syntax, but i can't even tell how. that's perl.
the new version is more readable anyway.

Change-Id: Ic3e93c2cf30ee92f368808070899af4b9f7809a3
Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
This commit is contained in:
Oswald Buddenhagen
2014-12-12 14:00:24 +01:00
committed by Simon Hausmann
parent 0163cb617a
commit b236ef6aef

View File

@@ -387,7 +387,9 @@ sub git_clone_all_submodules
}
if ($self->{update}) {
$self->exe('git', 'submodule', 'update', ($co_branch ? ('--remote', '--rebase') : ()));
my @cmd = ('git', 'submodule', 'update');
push @cmd, '--remote', '--rebase' if ($co_branch);
$self->exe(@cmd);
foreach my $module (@modules) {
if (-f $module.'/.gitmodules') {