Skip to content

Commit

Permalink
fix: use --diff-filter when using --staged (#10)
Browse files Browse the repository at this point in the history
* Add « fileExists » filter

* Revert "Add « fileExists » filter"

This reverts commit d8f5156.

* scms/git: add « --diff-filter » arg
  • Loading branch information
Kocal authored and azz committed Jan 17, 2018
1 parent 57f09b7 commit 48073d8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/scms/git.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,15 @@ export const getSinceRevision = (directory, { staged }) => {

export const getChangedFiles = (directory, revision, staged) => {
return (staged
? getLines(runGit(directory, ['diff', '--name-only', '--cached', revision]))
? getLines(
runGit(directory, [
'diff',
'--name-only',
'--cached',
'--diff-filter=ACMRTUB',
revision,
])
)
: [
...getLines(
runGit(directory, [
Expand Down

0 comments on commit 48073d8

Please sign in to comment.