summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorDavid Allsopp <david.allsopp@metastack.com>2019-03-07 11:51:31 +0000
committerDavid Allsopp <david.allsopp@metastack.com>2019-03-27 10:32:40 +0000
commitdb215dda8f31e52f97b2d4ae6830bf9435341566 (patch)
tree270b3050fdcaedcdfcc5737a877a8afa2a4852fa /tools
parentff26bf7a7256d83f2690d38b3ad69a8f4395868a (diff)
downloadocaml-db215dda8f31e52f97b2d4ae6830bf9435341566.tar.gz
Quote directories in pre-commit hook
Belt-and-braces, since we don't use spaces.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/pre-commit-githook6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/pre-commit-githook b/tools/pre-commit-githook
index 4a846f1acd..dcb6f90f81 100755
--- a/tools/pre-commit-githook
+++ b/tools/pre-commit-githook
@@ -15,7 +15,7 @@
# Bump this on any changes. It's vital that HOOK_VERSION followed by equals
# appears nowhere else in these sources!
-HOOK_VERSION=3
+HOOK_VERSION=4
# For what it's worth, allow for empty trees!
if git rev-parse --verify HEAD >/dev/null 2>&1
@@ -66,7 +66,7 @@ not_pruned () {
;;
*)
- not_pruned $DIR
+ not_pruned "$DIR"
return $?
esac
fi
@@ -79,7 +79,7 @@ export OCAML_CT_CAT="git cat-file --textconv"
export OCAML_CT_CA_FLAG=--cached
git diff --diff-filter=d --staged --name-only | (while IFS= read -r path
do
- if not_pruned $path && ! tools/check-typo ./$path ; then
+ if not_pruned "$path" && ! tools/check-typo "./$path" ; then
ERRORS=1
fi
done; exit $ERRORS)