From cb1512bb4c43cb9118dae6328ac40e786822775b Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Sun, 18 Oct 2020 00:49:21 -0400 Subject: [PATCH] Fixes issue with behind files & compare w/ working --- src/views/nodes/compareBranchNode.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/views/nodes/compareBranchNode.ts b/src/views/nodes/compareBranchNode.ts index 6283d87..5df169a 100644 --- a/src/views/nodes/compareBranchNode.ts +++ b/src/views/nodes/compareBranchNode.ts @@ -73,7 +73,7 @@ export class CompareBranchNode extends ViewNode { const files = await Container.git.getDiffStatus( this.uri.repoPath!, - // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing - GitRevision.createRange(this.branch.ref, this._compareWith?.ref || 'HEAD', '...'), + this.compareWithWorkingTree + ? // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing + this._compareWith?.ref || 'HEAD' + : // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing + GitRevision.createRange(this.branch.ref, this._compareWith?.ref || 'HEAD', '...'), ); return {