소스 검색

Fixes issue with repository status without changes

main
Eric Amodio 7 년 전
부모
커밋
00e9660227
2개의 변경된 파일6개의 추가작업 그리고 3개의 파일을 삭제
  1. +1
    -1
      src/commands/quickPickItems.ts
  2. +5
    -2
      src/commands/quickPicks.ts

+ 1
- 1
src/commands/quickPickItems.ts 파일 보기

@ -81,7 +81,7 @@ export class OpenCommitFilesCommandQuickPickItem extends OpenFilesCommandQuickPi
export class OpenStatusFilesCommandQuickPickItem extends OpenFilesCommandQuickPickItem {
constructor(statuses: GitFileStatusItem[], item?: PartialQuickPickItem) {
const repoPath = statuses[0].repoPath;
const repoPath = statuses.length && statuses[0].repoPath;
const fileNames = statuses.map(_ => _.fileName);
item = {

+ 5
- 2
src/commands/quickPicks.ts 파일 보기

@ -214,7 +214,10 @@ export class RepoStatusesQuickPick {
}));
}
}
items.splice(0, 0, new OpenStatusFilesCommandQuickPickItem(statuses.filter(_ => _.status !== GitFileStatus.Deleted)));
if (statuses.length) {
items.splice(0, 0, new OpenStatusFilesCommandQuickPickItem(statuses.filter(_ => _.status !== GitFileStatus.Deleted)));
}
if (goBackCommand) {
items.splice(0, 0, goBackCommand);
@ -222,7 +225,7 @@ export class RepoStatusesQuickPick {
return await window.showQuickPick(items, {
matchOnDescription: true,
placeHolder: 'Showing the repository status',
placeHolder: statuses.length ? 'Repository has changes' : 'Repository has no changes',
ignoreFocusOut: getQuickPickIgnoreFocusOut()
} as QuickPickOptions);
}

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