We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 46fbbb4 commit e6c3b0cCopy full SHA for e6c3b0c
hooks/pre-commit
@@ -11,7 +11,8 @@ else
11
against=$(git hash-object -t tree /dev/null)
12
fi
13
# cat always has error code 0
14
-filenames=$(git diff --cached --name-only $against | grep '\.py$' | cat)
+# ignore deleted files (can't be formatted)
15
+filenames=$(git diff --cached --name-only --diff-filter=d $against | grep '\.py$' | cat)
16
if [ -n "$filenames" ]
17
then
18
./scrapscript.py test
0 commit comments