X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=.git_template%2Fhooks%2Fpre-commit;fp=.git_template%2Fhooks%2Fpre-commit;h=7178d49b6c14aaf34c683661a67cc103bff629e2;hb=ef3bbffe6d2a08ebd735ba4f09c7bd0fbea585a0;hp=f1cb270e6a600e058166c342b0636f095e3d0641;hpb=6d1ec26482f86b0f2d9560ce3d04ea8c63297c25;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 <