summaryrefslogtreecommitdiff
path: root/pre-commit.sh
blob: ccf1943f8f393e3b111b27e9b2d82be29492dbb2 (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 '\S'"$(printf '\t')" && { echo 'Fix trailing whitespace!'; exit 1; }
exit 0