blob: ece0c8ad6e12b491c46d27401bcc3ffddae5f7a5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#!/usr/bin/env bash
#
# pre-commit hook — block commits when the canonical/mirror pair drifts.
#
# Enable by running: git config core.hooksPath githooks
# (handled by make install-hooks; idempotent on re-run.)
set -euo pipefail
repo_root="$(git rev-parse --show-toplevel)"
"$repo_root/scripts/sync-check.sh" || {
echo "" >&2
echo "pre-commit: canonical/mirror drift detected. Commit blocked." >&2
exit 1
}
|