summaryrefslogtreecommitdiff
path: root/pre-commit.sh
blob: 355314073de3543da9467ebcaa6bb16e21b0a2c2 (plain)
1
2
3
4
5
6
7
8
9
10
#!/bin/sh

# Pre-commit hook for ted development
# To install:
#   ln -s ../../pre-commit.sh .git/hooks/pre-commit

# Check for trailing whitespace
git grep -In ' $' && { echo 'Fix trailing whitespace!'; exit 1; }
git grep -In '\w'"$(printf '\t')"'$' && { echo 'Fix trailing whitespace!'; exit 1; }
exit 0