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:
Orgad Shaneh
2013-07-26 17:23:31 +03:00
committed by Orgad Shaneh
parent 1f007a6264
commit 044a78f750

View File

@@ -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;
}