diff options
author | Chris Kay <chris.kay@arm.com> | 2023-04-18 17:32:41 +0100 |
---|---|---|
committer | Chris Kay <chris.kay@arm.com> | 2023-04-18 17:38:20 +0100 |
commit | 9a905a7d86867bab8a5d9befd40a67a6ab9aaea2 (patch) | |
tree | 8822602292ed91ea888f8e8688254cf006e8a92c /.husky | |
parent | 0223d15764ed78319c0eac00c641c6148898a395 (diff) |
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 <chris.kay@arm.com>
Diffstat (limited to '.husky')
-rwxr-xr-x | .husky/prepare-commit-msg | 4 |
1 files changed, 3 insertions, 1 deletions
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 |