blob: e07d1f4c450e72e5c12d8c197876ce1ad38ee801 (
plain)
1
2
3
4
5
6
7
|
#!/usr/bin/env bash
if ! gitlint --ignore-stdin --staged --msg-filename "$1" run-hook; then
backup="$CODEROOT"/.git/COMMIT_EDITMSG.backup
cp "$CODEROOT"/.git/COMMIT_EDITMSG "$backup"
echo "error: gitlint failed, saved your commit msg as $backup"
exit 1
fi
|