1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-10-02 09:10:11 +02:00

pre-commit: fix multiple file issue

When using -z, you should always quote. If not, stuff like this happens:

	.git/hooks/pre-commit: line 10: [: too many arguments
This commit is contained in:
Daniel Martí 2016-02-15 12:01:43 +00:00
parent 9800ed1a1a
commit 437d06c51e

View File

@ -7,7 +7,7 @@
exec 1>&2
files=`git diff-index --cached HEAD 2>&1 | sed 's/^:.* //' | uniq | cut -b100-500`
if [ -z $files ]; then
if [ -z "$files" ]; then
PY_FILES="fdroid makebuildserver setup.py examples/*.py buildserver/*.py fdroidserver/*.py"
PY_TEST_FILES="tests/*.TestCase"
SH_FILES="hooks/pre-commit"