forked from qt-creator/qt-creator
Git - added submoduleDataMap to handle submodule data
Change-Id: I8462ed07f3d1edce5c7f5ab8c166ce8c68b6d4b3 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -511,21 +511,19 @@ void GerritPlugin::fetch(const QSharedPointer<Gerrit::Internal::GerritChange> &c
|
||||
}
|
||||
}
|
||||
|
||||
if (!verifiedRepository && QFile::exists(repository + QLatin1String("/.gitmodules"))) {
|
||||
QMap<QString,QString> submodules = gitClient->synchronousSubmoduleList(repository);
|
||||
|
||||
QMap<QString,QString>::const_iterator i = submodules.constBegin();
|
||||
while (i != submodules.constEnd()) {
|
||||
QString remote = i.value();
|
||||
if (!verifiedRepository) {
|
||||
Git::Internal::SubmoduleDataMap submodules = gitClient->submoduleList(repository);
|
||||
foreach (const Git::Internal::SubmoduleData &submoduleData, submodules) {
|
||||
QString remote = submoduleData.url;
|
||||
if (remote.endsWith(QLatin1String(".git")))
|
||||
remote.chop(4);
|
||||
if (remote.contains(m_parameters->host) && remote.endsWith(change->project)
|
||||
&& QFile::exists(repository + QLatin1Char('/') + i.key())) {
|
||||
repository = QDir::cleanPath(repository + QLatin1Char('/') + i.key());
|
||||
&& QFile::exists(repository + QLatin1Char('/') + submoduleData.dir)) {
|
||||
repository = QDir::cleanPath(repository + QLatin1Char('/')
|
||||
+ submoduleData.dir);
|
||||
verifiedRepository = true;
|
||||
break;
|
||||
}
|
||||
++i;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user