Commit 854a37cb authored by Tobias Hunger's avatar Tobias Hunger Committed by Hugues Delorme
Browse files

Git: Fix branch list when checking out from git



Task-number: QTCREATORBUG-6563

Change-Id: I18f20c477a5c3ac3921110c1f76f15fedeaab99b
Reviewed-by: default avatarHugues Delorme <delorme.hugues@fougsys.fr>
parent fe70f2db
......@@ -1476,9 +1476,10 @@ QStringList GitClient::synchronousRepositoryBranches(const QString &repositoryUR
continue;
}
const int slashPos = line.lastIndexOf(QLatin1Char('/'));
const QString branchName = line.mid(slashPos + 1);
if (slashPos != -1) {
const QString pattern = QLatin1String("\trefs/heads/");
const int pos = line.lastIndexOf(pattern);
const QString branchName = line.mid(pos + pattern.count());
if (pos != -1) {
if (line.startsWith(headSha))
branches[0] = branchName;
else
......
Supports Markdown
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