We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d5b74d0 commit 2a4739dCopy full SHA for 2a4739d
githooks/pre-commit
@@ -0,0 +1,11 @@
1
+#!/bin/bash
2
+
3
+cd "$(git rev-parse --show-toplevel)"
4
+DISALLOWED_PATTERN='KJ_DBG'
5
6
+if git diff-index -G"$DISALLOWED_PATTERN" --cached HEAD --diff-filter=AM -U0 | grep -i --color -E "$DISALLOWED_PATTERN"
7
+then
8
+ echo -e "\nERROR, disallowed text patterns detected."
9
+ echo -e "To commit anyway, use --no-verify\n"
10
+ exit 1
11
+fi
0 commit comments