Skip to content

Commit f67c5f1

Browse files
committed
Exclude changed files if deleted or from submodules
1 parent 6e874e1 commit f67c5f1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { execaSync } from 'execa';
22

3-
export default () => execaSync({ lines: true })`git diff-tree --name-only --no-commit-id -r HEAD@{1} HEAD`
3+
// Get the list of changed files since the previous HEAD from a git hook
4+
export default () => execaSync({ lines: true })`git diff-tree --name-only --no-commit-id --diff-filter=d --ignore-submodules -r HEAD@{1} HEAD`
45
.stdout
56
.filter((file) => !!file);

0 commit comments

Comments
 (0)