mirror of
git://code.qt.io/qt/qt5.git
synced 2026-02-01 19:36:04 +08:00
Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qt5-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qt5-staging: init-repository: avoid failure when combining `--force' and mirrors
This commit is contained in:
@@ -479,6 +479,13 @@ sub git_clone_one_submodule
|
||||
|
||||
if ($mirror) {
|
||||
$self->exe('git', 'config', 'remote.origin.url', $url);
|
||||
|
||||
# In `force' mode, remove the mirror if it already exists,
|
||||
# since we may be reinitializing the module.
|
||||
if ($self->{force}) {
|
||||
eval { $self->exe('git', 'remote', 'rm', 'mirror'); }; # failure is OK
|
||||
}
|
||||
|
||||
$self->exe('git', 'remote', 'add', 'mirror', $mirror);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user