fix: git template

This commit is contained in:
2020-07-10 18:55:14 +08:00
parent 4cddccd416
commit 1a47cfb2e0
3 changed files with 214 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
#!/bin/bash
cd "$(dirname "$0")/pre-commit.d"
for hook in *; do
bash $hook
RESULT=$?
if [ $RESULT != 0 ]; then
echo "pre-commit.d/$hook returned non-zero: $RESULT, abort commit"
exit $RESULT
fi
done
exit 0