Explorar el Código

Adds file status roll up to changed files quick pick item

main
Eric Amodio hace 7 años
padre
commit
dd0762152f
Se han modificado 1 ficheros con 6 adiciones y 1 borrados
  1. +6
    -1
      src/quickPicks/commitDetails.ts

+ 6
- 1
src/quickPicks/commitDetails.ts Ver fichero

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

Cargando…
Cancelar
Guardar