瀏覽代碼

Fixes issue with behind files & compare w/ working

main
Eric Amodio 4 年之前
父節點
當前提交
cb1512bb4c
共有 1 個檔案被更改,包括 6 行新增3 行删除
  1. +6
    -3
      src/views/nodes/compareBranchNode.ts

+ 6
- 3
src/views/nodes/compareBranchNode.ts 查看文件

@ -73,7 +73,7 @@ export class CompareBranchNode extends ViewNode
expand: false,
includeRepoName: true,
files: {
ref1: this.branch.ref,
ref1: this.compareWithWorkingTree ? '' : this.branch.ref,
ref2: this._compareWith.ref || 'HEAD',
query: this.getBehindFilesQuery.bind(this),
},
@ -243,8 +243,11 @@ export class CompareBranchNode extends ViewNode
private async getBehindFilesQuery(): Promise<FilesQueryResults> {
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 {

Loading…
取消
儲存