From d334126d01a506f0c45585162a3d4a088adc82b6 Mon Sep 17 00:00:00 2001 From: Akos Kitta Date: Sun, 7 Apr 2019 17:37:52 +0200 Subject: [PATCH] GH-4619: Adjusted ahead/behind on the status-bar. Hide ahead/behind when no changes. Closes #4619. Signed-off-by: Akos Kitta --- packages/git/src/browser/git-view-contribution.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/git/src/browser/git-view-contribution.ts b/packages/git/src/browser/git-view-contribution.ts index 5788509685c6c..c2965b2f43b07 100644 --- a/packages/git/src/browser/git-view-contribution.ts +++ b/packages/git/src/browser/git-view-contribution.ts @@ -502,7 +502,7 @@ export class GitViewContribution extends AbstractViewContribution const { upstreamBranch, aheadBehind } = status; if (upstreamBranch) { return { - text: '$(refresh)' + (aheadBehind ? ` ${aheadBehind.behind} $(arrow-down) ${aheadBehind.ahead} $(arrow-up)` : ''), + text: '$(refresh)' + (aheadBehind && (aheadBehind.ahead + aheadBehind.behind) > 0 ? ` ${aheadBehind.behind}↓ ${aheadBehind.ahead}↑` : ''), command: GIT_COMMANDS.SYNC.id, tooltip: 'Synchronize Changes' };