summaryrefslogtreecommitdiff
path: root/.git-hooks
diff options
context:
space:
mode:
authorShiro Kawai <shiro@acm.org>2020-06-25 22:50:09 -1000
committerTakeshi Abe <tabe@fixedpoint.jp>2020-10-09 08:41:27 +0200
commitd73776daa4a0e9397a9b86b5a250b210062fd760 (patch)
tree809732601db0e4e28db0ab355d7f5b8c98d8bbc0 /.git-hooks
parent60848fe54e2792a99970f8b48f6b9c02837b407e (diff)
tdf#134286: fix pre-commit hook to make hooks.allownonascii work
Even if hooks.allownonascii is set to true, the current code compares "true\n" vs "true" and always rejects committing. Change-Id: I75494f149db2537ad54230dd684f5dac9b43c8b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97213 Tested-by: Takeshi Abe <tabe@fixedpoint.jp> Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
Diffstat (limited to '.git-hooks')
-rwxr-xr-x.git-hooks/pre-commit1
1 files changed, 1 insertions, 0 deletions
diff --git a/.git-hooks/pre-commit b/.git-hooks/pre-commit
index 00a5e7cd7e67..5f9f5fc5eb2b 100755
--- a/.git-hooks/pre-commit
+++ b/.git-hooks/pre-commit
@@ -298,6 +298,7 @@ if ( system( "git rev-parse --verify HEAD >/dev/null 2>&1" ) == 0 )
# If you want to allow non-ascii filenames set this variable to true.
my $allownonascii=`git config hooks.allownonascii`;
+chomp $allownonascii;
# Cross platform projects tend to avoid non-ascii filenames; prevent
# them from being added to the repository. We exploit the fact that the