Debian Codegraph @

script/git-hooks/check-trailing-whitespace

raw symbols SCIP
1 #!/bin/sh
2
3 git diff-index --cached --check HEAD -- :/*.[ch] :/*.p[ylm]
4
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
15 fi
16
17 exit 0