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;
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user