forked from qt-creator/qt-creator
Git: Support remotes with whitespace on url
Task-number: QTCREATORBUG-9789 Change-Id: Id501ade0ac2ce7093fa38368f13b2bfab31bd35f Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
1f007a6264
commit
044a78f750
@@ -2038,12 +2038,11 @@ QMap<QString,QString> GitClient::synchronousRemotesList(const QString &workingDi
|
|||||||
if (!remote.endsWith(QLatin1String(" (push)")))
|
if (!remote.endsWith(QLatin1String(" (push)")))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
QStringList tokens = remote.split(QRegExp(QLatin1String("\\s")),
|
int tabIndex = remote.indexOf(QLatin1Char('\t'));
|
||||||
QString::SkipEmptyParts);
|
if (tabIndex == -1)
|
||||||
if (tokens.count() != 3)
|
|
||||||
continue;
|
continue;
|
||||||
|
QString url = remote.mid(tabIndex + 1, remote.length() - tabIndex - 8);
|
||||||
result.insert(tokens.at(0), tokens.at(1));
|
result.insert(remote.left(tabIndex), url);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user