summaryrefslogtreecommitdiffstats
path: root/init-repository
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2011-09-07 13:04:44 +1000
committerQt by Nokia <qt-info@nokia.com>2012-01-10 02:27:23 +0100
commit522634777b5750b548411506d69c7a816bd51f4f (patch)
treef584f3720aa11d088a73db9d34481bdd55630ee1 /init-repository
parentf917ea79ef75917ce9f7d166fd5f8e2b772b9058 (diff)
Push handling of --no-update to the 'git submodule update' call.
This allows running 'init-repository --no-update -f' to initialise and fetch new submodules without attempting to updating existing submodules which may have new commits applied which may cause the update to fail. Change-Id: I48040bc42235231eec3bc85b643b688c8e8b4bd9 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'init-repository')
-rwxr-xr-xinit-repository12
1 files changed, 7 insertions, 5 deletions
diff --git a/init-repository b/init-repository
index 4ee9cd17..fffdccb9 100755
--- a/init-repository
+++ b/init-repository
@@ -510,7 +510,9 @@ sub git_clone_all_submodules
}
}
- $self->exe('git', 'submodule', 'update', '--recursive');
+ if ($self->{update}) {
+ $self->exe('git', 'submodule', 'update', '--recursive');
+ }
return;
}
@@ -641,7 +643,9 @@ sub git_clone_one_submodule
}
}
}
- $self->exe('git', 'submodule', 'update');
+ if ($self->{update}) {
+ $self->exe('git', 'submodule', 'update');
+ }
}
chdir("..") or confess "cd ..: $OS_ERROR";
@@ -666,9 +670,7 @@ sub run
$self->git_set_submodule_config;
- if ($self->{update}) {
- $self->git_clone_all_submodules;
- }
+ $self->git_clone_all_submodules;
$self->git_add_remotes('qt5');