forked from qt-creator/qt-creator
Git: Fix branch list when checking out from git
Task-number: QTCREATORBUG-6563 Change-Id: I18f20c477a5c3ac3921110c1f76f15fedeaab99b Reviewed-by: Hugues Delorme <delorme.hugues@fougsys.fr>
This commit is contained in:
committed by
Hugues Delorme
parent
fe70f2db3b
commit
854a37cb1e
@@ -1476,9 +1476,10 @@ QStringList GitClient::synchronousRepositoryBranches(const QString &repositoryUR
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
const int slashPos = line.lastIndexOf(QLatin1Char('/'));
|
const QString pattern = QLatin1String("\trefs/heads/");
|
||||||
const QString branchName = line.mid(slashPos + 1);
|
const int pos = line.lastIndexOf(pattern);
|
||||||
if (slashPos != -1) {
|
const QString branchName = line.mid(pos + pattern.count());
|
||||||
|
if (pos != -1) {
|
||||||
if (line.startsWith(headSha))
|
if (line.startsWith(headSha))
|
||||||
branches[0] = branchName;
|
branches[0] = branchName;
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user