#!/bin/sh
# Rejects a commit that has whitespace errors, or that stages a Radiance
# source outside the test fixtures that is not in the canonical style (see
# scripts/check-fmt). The staged content is checked, not the working tree.

top=$(git rev-parse --show-toplevel) || exit 1

git diff --cached --check || exit 1
exec "$top/scripts/check-fmt" --staged
