summaryrefslogtreecommitdiff
path: root/src/plugins/git/branchmodel.cpp
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2016-03-09 22:33:24 +0200
committerOrgad Shaneh <orgads@gmail.com>2016-03-10 07:41:46 +0000
commit6d08c1f9140cbed571fed00132524b73f9a6e184 (patch)
treed1d387e7de5072e16e6da33c3edb1b79f292fd60 /src/plugins/git/branchmodel.cpp
parentbcc1786fa29281cfd1d42d9f63ddfc2771aa8ea0 (diff)
downloadqt-creator-6d08c1f9140cbed571fed00132524b73f9a6e184.tar.gz
Git: Document line output in branch model
Change-Id: I723df048844cf9a803aa0c438cddf8fdcdd407ba Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Diffstat (limited to 'src/plugins/git/branchmodel.cpp')
-rw-r--r--src/plugins/git/branchmodel.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/git/branchmodel.cpp b/src/plugins/git/branchmodel.cpp
index 86895f3897..d321d57f44 100644
--- a/src/plugins/git/branchmodel.cpp
+++ b/src/plugins/git/branchmodel.cpp
@@ -634,10 +634,12 @@ void BranchModel::parseOutputLine(const QString &line)
if (line.size() < 3)
return;
+ // objectname, refname, upstream:short, *objectname
QStringList lineParts = line.split(QLatin1Char('\t'));
const QString shaDeref = lineParts.at(3);
const QString sha = shaDeref.isEmpty() ? lineParts.at(0) : shaDeref;
const QString fullName = lineParts.at(1);
+ const QString upstream = lineParts.at(2);
bool current = (sha == m_currentSha);
bool showTags = m_client->settings().boolValue(GitSettings::showTagsKey);
@@ -671,7 +673,7 @@ void BranchModel::parseOutputLine(const QString &line)
const QString name = nameParts.last();
nameParts.removeLast();
- auto newNode = new BranchNode(name, sha, lineParts.at(2));
+ auto newNode = new BranchNode(name, sha, upstream);
root->insert(nameParts, newNode);
if (current)
m_currentBranch = newNode;