From 99bdfec58e60e53f6295e222dd23002271affc7c Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Thu, 5 Nov 2020 01:37:32 -0500 Subject: [PATCH] Uses tracking branch for ahead/behind if possible --- src/git/gitService.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/git/gitService.ts b/src/git/gitService.ts index 7ead79c..772c06e 100644 --- a/src/git/gitService.ts +++ b/src/git/gitService.ts @@ -1148,7 +1148,10 @@ export class GitService implements Disposable { if (weightedBranch.weight === maxDefaultBranchWeight) break; } - return GitRevision.createRange(weightedBranch!.branch.ref, branch.ref); + return GitRevision.createRange( + weightedBranch!.branch.tracking ?? weightedBranch!.branch.ref, + branch.ref, + ); } }