mirror of
git://code.qt.io/qt/qt5.git
synced 2026-04-20 03:46:44 +08:00
init-repository: fixed warnings when no mirror is used
Don't test for the existence of the mirror if the user didn't ask to use a mirror. Change-Id: Ib5565fa9a68ba6e22a4f7a179a0f00eb998da2aa Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
This commit is contained in:
committed by
Qt by Nokia
parent
013333216a
commit
fcfa9df1d2
@@ -572,11 +572,13 @@ sub git_clone_one_submodule
|
|||||||
$mirror =~ s/qtsoftware/gitorious/ ;
|
$mirror =~ s/qtsoftware/gitorious/ ;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Only use the mirror if it can be reached.
|
if ($mirror) {
|
||||||
eval { $self->exe('git', 'ls-remote', $mirror, 'test/if/mirror/exists') };
|
# Only use the mirror if it can be reached.
|
||||||
if ($@) {
|
eval { $self->exe('git', 'ls-remote', $mirror, 'test/if/mirror/exists') };
|
||||||
warn "mirror [$mirror] is not accessible; $url will be used\n";
|
if ($@) {
|
||||||
undef $mirror;
|
warn "mirror [$mirror] is not accessible; $url will be used\n";
|
||||||
|
undef $mirror;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
my $do_clone = (! -d "$submodule/.git");
|
my $do_clone = (! -d "$submodule/.git");
|
||||||
|
|||||||
Reference in New Issue
Block a user