Commit 044a78f7 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

Git: Support remotes with whitespace on url



Task-number: QTCREATORBUG-9789

Change-Id: Id501ade0ac2ce7093fa38368f13b2bfab31bd35f
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent 1f007a62
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment