summaryrefslogtreecommitdiff
path: root/scripts/git-hooks
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2011-11-12 14:00:18 +0100
committerJim Meyering <meyering@redhat.com>2011-11-12 14:00:18 +0100
commit635bcd0d19a1f8d16cb74eac3cdbf1c2694063ed (patch)
treeebf0a5f86b71572d84ffb4b28600b506d1bdccc5 /scripts/git-hooks
parentb64afe06058a88dd81020fa3d548a07c82c8e33e (diff)
downloadcoreutils-635bcd0d19a1f8d16cb74eac3cdbf1c2694063ed.tar.xz
maint: sync pre-commit script with git's
* scripts/git-hooks/pre-commit (allownonascii): Remove double quotes around $(...) construct, to make this file identical to git's sample hook script.
Diffstat (limited to 'scripts/git-hooks')
-rwxr-xr-xscripts/git-hooks/pre-commit4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/git-hooks/pre-commit b/scripts/git-hooks/pre-commit
index 1addec552..18c482976 100755
--- a/scripts/git-hooks/pre-commit
+++ b/scripts/git-hooks/pre-commit
@@ -28,8 +28,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
echo "Error: Attempt to add a non-ascii file name."
echo