This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Pre-commit hook to warn about large changes to db/structure.sql | |
| STRUCTURE_FILE="db/structure.sql" | |
| THRESHOLD=200 | |
| # Check if structure.sql is staged for commit | |
| if git diff --cached --name-only | grep -q "^${STRUCTURE_FILE}$"; then | |
| # Count the number of changed lines (additions + deletions) |
OlderNewer