diff options
Diffstat (limited to 'Omni/Ide/hooks/commit-msg')
-rwxr-xr-x | Omni/Ide/hooks/commit-msg | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Omni/Ide/hooks/commit-msg b/Omni/Ide/hooks/commit-msg new file mode 100755 index 0000000..e07d1f4 --- /dev/null +++ b/Omni/Ide/hooks/commit-msg @@ -0,0 +1,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 |