aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/dot_config/git/hooks/executable_pre-commit
diff options
context:
space:
mode:
Diffstat (limited to 'dot_config/git/hooks/executable_pre-commit')
-rwxr-xr-xdot_config/git/hooks/executable_pre-commit15
1 files changed, 15 insertions, 0 deletions
diff --git a/dot_config/git/hooks/executable_pre-commit b/dot_config/git/hooks/executable_pre-commit
new file mode 100755
index 0000000..548925b
--- /dev/null
+++ b/dot_config/git/hooks/executable_pre-commit
@@ -0,0 +1,15 @@
+#!/bin/sh
+# User-level pre-commit. No global checks — exists purely so that
+# `<repo>/.githooks/pre-commit` gets picked up automatically without
+# the project needing to override core.hooksPath. If there is no
+# per-repo hook this is a no-op.
+#
+# Bypass: git commit --no-verify
+
+set -eu
+
+# shellcheck source=./_dispatch.sh
+. "${0%/*}/_dispatch.sh"
+dispatch_repo_hook pre-commit "$@"
+
+exit 0