瀏覽代碼

Adds file status roll up to changed files quick pick item

main
Eric Amodio 7 年之前
父節點
當前提交
dd0762152f
共有 1 個檔案被更改,包括 6 行新增1 行删除
  1. +6
    -1
      src/quickPicks/commitDetails.ts

+ 6
- 1
src/quickPicks/commitDetails.ts 查看文件

@ -61,9 +61,14 @@ export class CommitDetailsQuickPick {
description: `\u00a0 \u2014 \u00a0\u00a0 $(git-commit) ${commit.shortSha} \u00a0 $(git-compare) \u00a0 $(file-directory) Working Tree`
}, Commands.DiffDirectory, [uri, commit.sha]));
const added = commit.fileStatuses.filter(_ => _.status === 'A' || _.status === '?').length;
const deleted = commit.fileStatuses.filter(_ => _.status === 'D').length;
const changed = commit.fileStatuses.filter(_ => _.status !== 'A' && _.status !== '?' && _.status !== 'D').length;
items.splice(index++, 0, new CommandQuickPickItem({
label: `Changed Files`,
description: null
description: `+${added} ~${changed} -${deleted}`
}, Commands.ShowQuickCommitDetails, [uri, commit.sha, commit, goBackCommand, repoLog]));
items.push(new OpenCommitFilesCommandQuickPickItem(commit));

Loading…
取消
儲存