12 lines
366 B
Makefile
12 lines
366 B
Makefile
|
|
|
|
# ━━━ Pre-commit hook (forbid root binaries) ━━━
|
|
.PHONY: install-hooks
|
|
install-hooks:
|
|
@if [ "$$(git config core.hooksPath 2>/dev/null)" != "hooks/" ]; then \
|
|
git config core.hooksPath hooks/; \
|
|
echo "Configured git core.hooksPath=hooks/"; \
|
|
fi
|
|
@chmod +x hooks/pre-commit
|
|
@echo "Pre-commit hook installed. (Bypass with: git commit --no-verify)"
|