Ver a proveniência

Fixes issue with behind files & compare w/ working

main
Eric Amodio há 4 anos
ascendente
cometimento
cb1512bb4c
1 ficheiros alterados com 6 adições e 3 eliminações
  1. +6
    -3
      src/views/nodes/compareBranchNode.ts

+ 6
- 3
src/views/nodes/compareBranchNode.ts Ver ficheiro

@ -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 {

Carregando…
Cancelar
Guardar