mirror of
git://code.qt.io/qt/qt5.git
synced 2026-02-01 19:36:04 +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/ ;
|
||||
}
|
||||
|
||||
# Only use the mirror if it can be reached.
|
||||
eval { $self->exe('git', 'ls-remote', $mirror, 'test/if/mirror/exists') };
|
||||
if ($@) {
|
||||
warn "mirror [$mirror] is not accessible; $url will be used\n";
|
||||
undef $mirror;
|
||||
if ($mirror) {
|
||||
# Only use the mirror if it can be reached.
|
||||
eval { $self->exe('git', 'ls-remote', $mirror, 'test/if/mirror/exists') };
|
||||
if ($@) {
|
||||
warn "mirror [$mirror] is not accessible; $url will be used\n";
|
||||
undef $mirror;
|
||||
}
|
||||
}
|
||||
|
||||
my $do_clone = (! -d "$submodule/.git");
|
||||
|
||||
Reference in New Issue
Block a user