Let init-repository build the mirror URL from the original URL

This allows repositories that have a different submodule name than their
URL file part to be using the mirror.

i.e. qtwebengine's src/3rdparty mapped to .../qt/qtwebengine-chromium.git

Change-Id: Ibea9cb9db701c95fc6f8b0e2457de74823aeeba5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
This commit is contained in:
Jocelyn Turcotte
2014-08-13 14:46:46 +02:00
parent 48cd6bb500
commit 8801fd0258

View File

@@ -540,8 +540,8 @@ sub git_clone_one_submodule
}
my $mirror;
if ($mirror_url) {
$mirror = $mirror_url."qt/$submodule";
if ($mirror_url and $url =~ /\/(qt\/[^.]+)\.git/) {
$mirror = $mirror_url.$1;
$mirror .= ".git" unless (-d $mirror); # Support local disk mirror
}