summaryrefslogtreecommitdiff
path: root/templates/hooks--pre-commit.sample
diff options
context:
space:
mode:
authorLibravatar Johan Herland <johan@herland.net>2013-09-24 09:52:56 +0200
committerLibravatar Jonathan Nieder <jrnieder@gmail.com>2013-09-24 12:26:49 -0700
commitaf1748b31eb68643f1b8d9d918f43611cf96d257 (patch)
tree2d9ad75018b85dfb6f592e38f0f0266497e22a01 /templates/hooks--pre-commit.sample
parentclone: add a period after "done" to end the sentence (diff)
downloadtgif-af1748b31eb68643f1b8d9d918f43611cf96d257.tar.xz
sample pre-commit hook: use --bool when retrieving config var
Currently if you set [hooks] allowNonAscii (or allownonascii = 1, or = yes) in your .git/config then the sample pre-commit misinterprets the value as "false" and rejects non-ASCII filenames. Use "git config --bool" to get the usual nicer boolean handling. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Diffstat (limited to 'templates/hooks--pre-commit.sample')
-rwxr-xr-xtemplates/hooks--pre-commit.sample2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/hooks--pre-commit.sample b/templates/hooks--pre-commit.sample
index 586e3bf94d..68d62d5446 100755
--- a/templates/hooks--pre-commit.sample
+++ b/templates/hooks--pre-commit.sample
@@ -16,7 +16,7 @@ else
fi
# If you want to allow non-ASCII filenames set this variable to true.
-allownonascii=$(git config hooks.allownonascii)
+allownonascii=$(git config --bool hooks.allownonascii)
# Redirect output to stderr.
exec 1>&2