Removing large files; adding hook to watch for them
This commit is contained in:
9
precommit-hooks/find-data-files
Normal file
9
precommit-hooks/find-data-files
Normal file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
result="$(find roles/*/{files,templates} -type f -exec file {} \; | grep -Ev ASCII\ text\|empty\|Unicode\ text)"
|
||||
if [ -n "$result" ]; then
|
||||
echo "These files need to be evaluated -- generally, don't commit data files to Git."
|
||||
echo "$result"
|
||||
exit 1
|
||||
fi
|
||||
exit 0
|
Reference in New Issue
Block a user