pre-commit 477 Bytes
Newer Older
1
#!/bin/sh
2 3 4 5
if  git rev-parse -q --verify MERGE_HEAD
then
    echo "In merge state"
else  
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
git stash -q --keep-index
if git diff HEAD|grep -i " STOP"|grep -q '\+' 
then 
  cat <<\EOF

It looks like you introduced a stop command in your code.
Please use calls to judft_error instead, as this ensures proper 
termination of the program.

If this is actually a false alarm, please commit again with
the --no-verify option.

EOF
    git stash pop -q
    exit 1
fi
git stash pop -q
23
fi