Git: Show upstream status for tracked branches

The Branch View now shows how many commmits
a branch is ahead and behind its tracking
branch.

Example:

  master ↑1 ↓15 [origin/master]

Change-Id: I9564efdfe82154cd98b9856313170aacad036f0c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
Andre Hartmann
2019-12-13 22:36:01 +01:00
committed by André Hartmann
parent 4a8e8f2b6e
commit 31e9c93b6b
3 changed files with 50 additions and 4 deletions

View File

@@ -3037,6 +3037,15 @@ bool GitClient::synchronousSetTrackingBranch(const QString &workingDirectory,
== SynchronousProcessResponse::Finished;
}
VcsBase::VcsCommand *GitClient::asyncUpstreamStatus(const QString &workingDirectory,
const QString &branch,
const QString &upstream)
{
const QStringList args {"rev-list", noColorOption, "--left-right", "--count",
branch + "..." + upstream};
return vcsExec(workingDirectory, args, nullptr, false, silentFlags);
}
void GitClient::handleMergeConflicts(const QString &workingDir, const QString &commit,
const QStringList &files, const QString &abortCommand)
{