summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2013-07-26 17:23:31 +0300
committerOrgad Shaneh <orgads@gmail.com>2013-07-29 10:32:36 +0200
commit044a78f7501518e89615390a467a1fc1026efc0e (patch)
treea6b478bbc58a91018904d0a78a958e982545fcdb /src
parent1f007a6264f667a0281a4c14ac9d8b87405fed06 (diff)
downloadqt-creator-044a78f7501518e89615390a467a1fc1026efc0e.tar.gz
Git: Support remotes with whitespace on url
Task-number: QTCREATORBUG-9789 Change-Id: Id501ade0ac2ce7093fa38368f13b2bfab31bd35f Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/git/gitclient.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp
index aa1fc2851a..6373371599 100644
--- a/src/plugins/git/gitclient.cpp
+++ b/src/plugins/git/gitclient.cpp
@@ -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;
}