diff options
Diffstat (limited to 'templates/hooks--pre-commit.sample')
-rwxr-xr-x | templates/hooks--pre-commit.sample | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/hooks--pre-commit.sample b/templates/hooks--pre-commit.sample index e144712..29ed5ee 100755 --- a/templates/hooks--pre-commit.sample +++ b/templates/hooks--pre-commit.sample @@ -28,7 +28,7 @@ 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 | + test $(git diff-index --cached --name-only --diff-filter=A -z $against | LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 then cat <<\EOF |