diff --git a/pre-commit b/pre-commit index a971a58..2fdb6f6 100755 --- a/pre-commit +++ b/pre-commit @@ -1,7 +1,7 @@ #!/bin/bash # Introduce: https://github.com/wolfogre/git-text -# Version: v1.0.0 +# Version: v1.0.1 set -e @@ -10,7 +10,7 @@ if [[ -z "$FILES" ]]; then exit 0 fi -WRONG_FILES=$(file --mime-type ${FILES} | grep -v -E "(text/[A-Za-z0-9.-]*|inode/x-empty)$" | cat) +WRONG_FILES=$(file --mime-type ${FILES} | grep -v -E "(text/[A-Za-z0-9.-]*|inode/x-empty|inode/directory)$" | cat) if [[ -n "${WRONG_FILES}" ]]; then echo "DELETE NON-TEXT FILES OR USE 'git commit -n':"