chore: point the pre-commit hook at branch-policy.yml

The comment referred to .github/README.md, which does not exist, and
described the repo as having no remote with branch protection. The
enforced rule now lives in .github/workflows/branch-policy.yml.
This commit is contained in:
Nayan
2026-08-11 06:01:41 +05:30
parent 9461e3a6f6
commit 00674695fe
+3 -2
View File
@@ -1,7 +1,8 @@
#!/bin/sh
# Block direct commits to main — branch first, then open a PR. This and the
# pre-push guard are the only main protection there is until the repo has a
# remote with branch protection turned on (see .github/README.md).
# pre-push guard are the local half of that rule, and a hook is only ever a
# courtesy: `--no-verify` skips it. The enforced half is
# .github/workflows/branch-policy.yml, which decides what may target main.
branch="$(git rev-parse --abbrev-ref HEAD)"
if [ "$branch" = "main" ]; then
echo "✖ Direct commits to 'main' are blocked — branch first: git switch -c <name>"