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
This commit is contained in:
Laurent Monin
2024-05-14 21:03:17 +02:00
parent 5c366fd387
commit 8b0766d488

View File

@@ -25,11 +25,10 @@ and make it executable:
```bash
#!/usr/bin/env bash
PYFILES=$(git diff --cached --name-only | grep "\\.py$" | grep --invert-match \
PYFILES=$(git diff --cached --name-only --diff-filter=ACM| grep "\\.py$" | grep --invert-match \
-e "^tagger\\.py$" \
-e "^picard/resources\\.py$" \
-e "^picard/\(coverart/providers\|formats\)/__init__\\.py$" \
-e "^picard/const/\(__init__\|attributes\|countries\)\\.py$" \
-e "^picard/const/\(attributes\|countries\)\\.py$" \
-e "^picard/ui/ui_.*\\.py$" \
-e "^scripts/picard\\.in$")