소스 검색

Fixes #1498: Saved compares dont restore properly

main
Eric Amodio 3 년 전
부모
커밋
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),
);
}

불러오는 중...
취소
저장