Просмотр исходного кода

Fixes #1498: Saved compares dont restore properly

main
Eric Amodio 3 лет назад
Родитель
Сommit
9e1375e873
3 измененных файлов: 11 добавлений и 3 удалений
  1. +1
    -0
      CHANGELOG.md
  2. +2
    -2
      src/views/nodes/compareResultsNode.ts
  3. +8
    -1
      src/views/searchAndCompareView.ts

+ 1
- 0
CHANGELOG.md Просмотреть файл

@ -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 Просмотреть файл

@ -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 Просмотреть файл

@ -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),
);
}

Загрузка…
Отмена
Сохранить