Explorar el Código

Fixes #1498: Saved compares dont restore properly

main
Eric Amodio hace 3 años
padre
commit
9e1375e873
Se han modificado 3 ficheros con 11 adiciones y 3 borrados
  1. +1
    -0
      CHANGELOG.md
  2. +2
    -2
      src/views/nodes/compareResultsNode.ts
  3. +8
    -1
      src/views/searchAndCompareView.ts

+ 1
- 0
CHANGELOG.md Ver fichero

@ -17,6 +17,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
### Fixed
- Fixes [#1498](https://github.com/eamodio/vscode-gitlens/issues/1498) - "Search & Compare" broken entries
- Fixes [#1507](https://github.com/eamodio/vscode-gitlens/issues/1507) - Communicate git error instead of "unable to find git"
- Fixes [#1512](https://github.com/eamodio/vscode-gitlens/issues/1512) - Git tag command can add an extra `-m`
- Fixes [#1402](https://github.com/eamodio/vscode-gitlens/issues/1402) - File history missing commits from other branches

+ 2
- 2
src/views/nodes/compareResultsNode.ts Ver fichero

@ -331,8 +331,8 @@ export class CompareResultsNode extends ViewNode {
type: 'comparison',
timestamp: this._pinned,
path: this.repoPath,
ref1: this._ref,
ref2: this._compareWith,
ref1: { label: this._ref.label, ref: this._ref.ref },
ref2: { label: this._compareWith.label, ref: this._compareWith.ref },
});
}
}

+ 8
- 1
src/views/searchAndCompareView.ts Ver fichero

@ -447,7 +447,14 @@ export class SearchAndCompareView extends ViewBase
.sort((a, b) => (b.timestamp ?? 0) - (a.timestamp ?? 0))
.map(p =>
p.type === 'comparison'
? new CompareResultsNode(this, root, p.path, p.ref1, p.ref2, p.timestamp)
? new CompareResultsNode(
this,
root,
p.path,
{ label: p.ref1.label, ref: p.ref1.ref ?? (p.ref1 as any).name ?? (p.ref1 as any).sha },
{ label: p.ref2.label, ref: p.ref2.ref ?? (p.ref2 as any).name ?? (p.ref2 as any).sha },
p.timestamp,
)
: new SearchResultsNode(this, root, p.path, p.search, p.labels, undefined, p.timestamp),
);
}

Cargando…
Cancelar
Guardar