From b236ef6aefae55165044567448073f1618b52806 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 12 Dec 2014 14:00:24 +0100 Subject: 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 --- init-repository | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'init-repository') diff --git a/init-repository b/init-repository index 9844f38c..6a7bd38e 100755 --- a/init-repository +++ b/init-repository @@ -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') { -- cgit v1.2.3