Explorar el Código

Fixes issue with behind files & compare w/ working

main
Eric Amodio hace 4 años
padre
commit
cb1512bb4c
Se han modificado 1 ficheros con 6 adiciones y 3 borrados
  1. +6
    -3
      src/views/nodes/compareBranchNode.ts

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

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

Cargando…
Cancelar
Guardar