From 6d08c1f9140cbed571fed00132524b73f9a6e184 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh <orgad.shaneh@audiocodes.com> Date: Wed, 9 Mar 2016 22:33:24 +0200 Subject: [PATCH] Git: Document line output in branch model Change-Id: I723df048844cf9a803aa0c438cddf8fdcdd407ba Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com> --- src/plugins/git/branchmodel.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/git/branchmodel.cpp b/src/plugins/git/branchmodel.cpp index 86895f38977..d321d57f444 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; -- GitLab