From: Chris Kay Date: Tue, 18 Apr 2023 16:32:41 +0000 (+0100) Subject: build(hooks): allow hooks to skip Commitizen X-Git-Tag: baikal/aarch64/sdk5.10~1^2~82^2 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=9a905a7d86867bab8a5d9befd40a67a6ab9aaea2;p=arm-tf.git build(hooks): allow hooks to skip Commitizen Adds a conditional check in the `prepare-commit-msg` commit hook that reads the `tf-a.disableCommitizen` Git configuration option, and does not execute Commitizen if it is found. To skip Commitizen, run: git config tf-a.disableCommitizen true Change-Id: Ic8967f6f42bf3555df09b57096044fb99438d4d4 Signed-off-by: Chris Kay --- diff --git a/.husky/prepare-commit-msg b/.husky/prepare-commit-msg index 593dfa88b..617400ae5 100755 --- a/.husky/prepare-commit-msg +++ b/.husky/prepare-commit-msg @@ -3,4 +3,6 @@ # shellcheck source=./_/husky.sh . "$(dirname "$0")/_/husky.sh" -"$(dirname "$0")/prepare-commit-msg.cz" "$@" +if ! git config --get tf-a.disableCommitizen > /dev/null; then + "$(dirname "$0")/prepare-commit-msg.cz" "$@" +fi