summaryrefslogtreecommitdiff
path: root/tools/pre-commit
diff options
context:
space:
mode:
Diffstat (limited to 'tools/pre-commit')
-rwxr-xr-xtools/pre-commit7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/pre-commit b/tools/pre-commit
new file mode 100755
index 0000000..1cf06b6
--- /dev/null
+++ b/tools/pre-commit
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Optional git pre-commit hook: run the 1MB budget + solver gate.
+# Install (from the repo root):
+# ln -s ../../tools/pre-commit .git/hooks/pre-commit
+set -eu
+root=$(git rev-parse --show-toplevel)
+exec "$root/tools/check.sh"