summaryrefslogtreecommitdiff
path: root/Biz/Ide
diff options
context:
space:
mode:
Diffstat (limited to 'Biz/Ide')
-rwxr-xr-xBiz/Ide/hooks/commit-msg7
1 files changed, 6 insertions, 1 deletions
diff --git a/Biz/Ide/hooks/commit-msg b/Biz/Ide/hooks/commit-msg
index 64e400d..e07d1f4 100755
--- a/Biz/Ide/hooks/commit-msg
+++ b/Biz/Ide/hooks/commit-msg
@@ -1,2 +1,7 @@
#!/usr/bin/env bash
-gitlint --ignore-stdin --staged --msg-filename "$1" run-hook
+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