s4:include: Remove trailing whitespace
[Samba.git] / script / git-hooks / check-trailing-whitespace
blob4dc1a6d898454c90525663c151a592fbe96622ff
1 #!/bin/sh
3 git diff-index --cached --check HEAD -- :/*.[ch] :/*.p[ylm]
5 if [ $? != 0 ]; then
6 echo
7 echo "The commit failed because it seems to introduce trailing whitespace"
8 echo "into C, Perl, or Python code."
9 echo
10 echo "If you are sure you want to do this, repeat the commit with the "
11 echo "--no-verify, like this:"
12 echo
13 echo " git commit --no-verify"
14 exit 1
17 exit 0