mirror of
git://code.qt.io/qt/qt5.git
synced 2026-01-14 10:56:47 +08:00
don't uninit submodules before re-initing
git-submodule init will simply not touch the already initialized submodules. this is just fine, as we'll overwrite the config entries with our own urls (and remove the obsolete ones) afterwards anyway. Change-Id: I6372bd48be9792e456899dc829226921990140c4 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
This commit is contained in:
@@ -284,16 +284,7 @@ sub check_if_already_initialized
|
||||
|
||||
# We consider the repo as `initialized' if submodule.qtbase.url is set
|
||||
if (qx(git config --get submodule.qtbase.url)) {
|
||||
if ($self->{force}) {
|
||||
my @configresult = qx(git config -l);
|
||||
foreach (@configresult) {
|
||||
# Example line: submodule.qtqa.url=git://gitorious.org/qt/qtqa.git
|
||||
if (/(submodule\.[^.=]+)\.url=.*/) {
|
||||
$self->exe('git', 'config', '--remove-section', $1);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (!$self->{force}) {
|
||||
exit 0 if ($self->{quiet});
|
||||
print "Will not reinitialize already initialized repository (use -f to force)!\n";
|
||||
exit 1;
|
||||
|
||||
Reference in New Issue
Block a user