Skip to content

Commit 8b0766d

Browse files
committed
Update pre-commit example
- some files were ignored, but there's no reason anymore - use git diff --diff-filter=ACM to avoid to check removed files or so
1 parent 5c366fd commit 8b0766d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,10 @@ and make it executable:
2525
```bash
2626
#!/usr/bin/env bash
2727

28-
PYFILES=$(git diff --cached --name-only | grep "\\.py$" | grep --invert-match \
28+
PYFILES=$(git diff --cached --name-only --diff-filter=ACM| grep "\\.py$" | grep --invert-match \
2929
-e "^tagger\\.py$" \
3030
-e "^picard/resources\\.py$" \
31-
-e "^picard/\(coverart/providers\|formats\)/__init__\\.py$" \
32-
-e "^picard/const/\(__init__\|attributes\|countries\)\\.py$" \
31+
-e "^picard/const/\(attributes\|countries\)\\.py$" \
3332
-e "^picard/ui/ui_.*\\.py$" \
3433
-e "^scripts/picard\\.in$")
3534

0 commit comments

Comments
 (0)