Files
cs249r_book/book/tools/git-hooks/setup.sh
Vijay Janapa Reddi bb0cecbe3d chore: add git hooks to run pre-commit on all files (matches CI)
- book/tools/git-hooks/pre-commit: runs pre-commit run --all-files
- setup.sh: one-time config (git config core.hooksPath)
- Ensures local commits pass same checks as CI
2026-03-02 20:45:01 -05:00

7 lines
284 B
Bash
Executable File

#!/usr/bin/env bash
# One-time setup: point git to hooks that run pre-commit on all files (matches CI).
set -e
cd "$(git rev-parse --show-toplevel)"
git config core.hooksPath book/tools/git-hooks
echo "✅ Git hooks configured. Commits will run pre-commit on all files (same as CI)."