X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=.git_template%2Fhooks%2Fpre-commit;h=182dcb9af9ea5fcac76786e4bf293c677afbd5ed;hb=HEAD;hp=f1cb270e6a600e058166c342b0636f095e3d0641;hpb=50f25d1eec109c4596cfc638c9a7c98da0f0b5d0;p=distro-setup diff --git a/.git_template/hooks/pre-commit b/.git_template/hooks/pre-commit index f1cb270..7178d49 100755 --- a/.git_template/hooks/pre-commit +++ b/.git_template/hooks/pre-commit @@ -65,8 +65,8 @@ if [[ $allownonascii != true ]] && # Note that the use of brackets around a tr range is ok here, (it's # even required, for portability to Solaris 10's /usr/bin/tr), since # the square bracket bytes happen to fall in the designated range. - test $(git diff --cached --name-only --diff-filter=A -z $against | - LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 + test "$(git diff --cached --name-only --diff-filter=A -z $against | + LC_ALL=C tr -d '[ -~]\0' | wc -c)" != 0 then cat <