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:
Oswald Buddenhagen
2014-08-15 20:04:48 +02:00
parent 6ab23f16f5
commit 836f00a76e

View File

@@ -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;