From 183873a4187a7788405b800ac522fbd747074e57 Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Sun, 31 Jan 2021 01:34:52 -0500 Subject: [PATCH] Stops comparing the branch to itself --- src/git/gitService.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/git/gitService.ts b/src/git/gitService.ts index 875b737..6ca8111 100644 --- a/src/git/gitService.ts +++ b/src/git/gitService.ts @@ -1255,10 +1255,10 @@ export class GitService implements Disposable { if (weightedBranch.weight === maxDefaultBranchWeight) break; } - return GitRevision.createRange( - weightedBranch!.branch.tracking ?? weightedBranch!.branch.ref, - branch.ref, - ); + const possibleBranch = weightedBranch!.branch.tracking ?? weightedBranch!.branch.ref; + if (possibleBranch !== branch.ref) { + return GitRevision.createRange(possibleBranch, branch.ref); + } } }