From 836f00a76e4f8c623f99bcb29cf1b3f0d101cc08 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 15 Aug 2014 20:04:48 +0200 Subject: [PATCH] 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 --- init-repository | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/init-repository b/init-repository index 4eaeb17d..c2b2916d 100755 --- a/init-repository +++ b/init-repository @@ -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;