.githooks/pre-commit 357 B raw
1
#!/bin/sh
2
# Rejects a commit that has whitespace errors, or that stages a Radiance
3
# source outside the test fixtures that is not in the canonical style (see
4
# scripts/check-fmt). The staged content is checked, not the working tree.
5
6
top=$(git rev-parse --show-toplevel) || exit 1
7
8
git diff --cached --check || exit 1
9
exec "$top/scripts/check-fmt" --staged