annotate Lib/fftw-3.2.1/.git/hooks/pre-commit.sample @ 8:fdc592312a96

Vectorised Xcorr
author Geogaddi\David <d.m.ronan@qmul.ac.uk>
date Wed, 22 Jul 2015 15:28:00 +0100
parents 25bf17994ef1
children
rev   line source
d@0 1 #!/bin/sh
d@0 2 #
d@0 3 # An example hook script to verify what is about to be committed.
d@0 4 # Called by "git commit" with no arguments. The hook should
d@0 5 # exit with non-zero status after issuing an appropriate message if
d@0 6 # it wants to stop the commit.
d@0 7 #
d@0 8 # To enable this hook, rename this file to "pre-commit".
d@0 9
d@0 10 if git rev-parse --verify HEAD >/dev/null 2>&1
d@0 11 then
d@0 12 against=HEAD
d@0 13 else
d@0 14 # Initial commit: diff against an empty tree object
d@0 15 against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
d@0 16 fi
d@0 17
d@0 18 # If you want to allow non-ascii filenames set this variable to true.
d@0 19 allownonascii=$(git config hooks.allownonascii)
d@0 20
d@0 21 # Redirect output to stderr.
d@0 22 exec 1>&2
d@0 23
d@0 24 # Cross platform projects tend to avoid non-ascii filenames; prevent
d@0 25 # them from being added to the repository. We exploit the fact that the
d@0 26 # printable range starts at the space character and ends with tilde.
d@0 27 if [ "$allownonascii" != "true" ] &&
d@0 28 # Note that the use of brackets around a tr range is ok here, (it's
d@0 29 # even required, for portability to Solaris 10's /usr/bin/tr), since
d@0 30 # the square bracket bytes happen to fall in the designated range.
d@0 31 test $(git diff --cached --name-only --diff-filter=A -z $against |
d@0 32 LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0
d@0 33 then
d@0 34 echo "Error: Attempt to add a non-ascii file name."
d@0 35 echo
d@0 36 echo "This can cause problems if you want to work"
d@0 37 echo "with people on other platforms."
d@0 38 echo
d@0 39 echo "To be portable it is advisable to rename the file ..."
d@0 40 echo
d@0 41 echo "If you know what you are doing you can disable this"
d@0 42 echo "check using:"
d@0 43 echo
d@0 44 echo " git config hooks.allownonascii true"
d@0 45 echo
d@0 46 exit 1
d@0 47 fi
d@0 48
d@0 49 # If there are whitespace errors, print the offending file names and fail.
d@0 50 exec git diff-index --check --cached $against --