commit cd707e8f4d2dfa3f8707c60fe5bb8c3d91834b20
parent 1d78defba5cba1f11528098dccb82594a3c24f7e
Author: Evgeny Grin (Karlson2k) <k2k@drgrin.dev>
Date: Wed, 11 Jun 2025 17:34:29 +0200
bootstrap: make sure that pre-commit hook really used
Diffstat:
2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/bootstrap b/bootstrap
@@ -152,6 +152,9 @@ if test -d "${GIT_DIR-.git}"; then
test $? -eq 0 || cp contrib/precommit_hook.sh "${GIT_DIR-.git}/hooks/pre-commit" || \
echo "Failed to install pre-commit git hook" 1>&2
if test -f "${GIT_DIR-.git}/hooks/pre-commit"; then
+ if test chmod +x "${GIT_DIR-.git}/hooks/pre-commit"; then :; else
+ echo "Failed to mark the pre-commit Git hook as executable" 1>&2
+ fi
if dir_GIT_HOOKS=`"$GIT" config --get core.hooksPath 2>/dev/null` && test "X$dir_GIT_HOOKS" != "X${GIT_DIR-.git}/hooks"; then
echo "Installed hook will not be used due to git configuration."
echo "Consider updating git configuration by running the following command:"
diff --git a/contrib/precommit_hook.sh b/contrib/precommit_hook.sh