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)")))
|
||||
continue;
|
||||
|
||||
QStringList tokens = remote.split(QRegExp(QLatin1String("\\s")),
|
||||
QString::SkipEmptyParts);
|
||||
if (tokens.count() != 3)
|
||||
int tabIndex = remote.indexOf(QLatin1Char('\t'));
|
||||
if (tabIndex == -1)
|
||||
continue;
|
||||
|
||||
result.insert(tokens.at(0), tokens.at(1));
|
||||
QString url = remote.mid(tabIndex + 1, remote.length() - tabIndex - 8);
|
||||
result.insert(remote.left(tabIndex), url);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
Reference in New Issue
Block a user