Skip to content

Commit

Permalink
Update pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfogre authored Jun 12, 2019
1 parent d52e3dd commit a656174
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pre-commit
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# Introduce: https://github.com/wolfogre/git-text
# Version: v1.0.0
# Version: v1.0.1

set -e

Expand All @@ -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':"
Expand Down

0 comments on commit a656174

Please sign in to comment.