From 552b467102af194c8109f5d0dc9ac9a4e67f3877 Mon Sep 17 00:00:00 2001 From: druckdev <63563978+druckdev@users.noreply.github.com> Date: Sat, 10 Oct 2020 13:26:42 +0200 Subject: [PATCH] meta:commit-msg-hook: Add more special characters --- meta/git/hooks/commit-msg | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meta/git/hooks/commit-msg b/meta/git/hooks/commit-msg index 7bbb677..ec720b3 100755 --- a/meta/git/hooks/commit-msg +++ b/meta/git/hooks/commit-msg @@ -19,13 +19,13 @@ body="$(tail +2 "$1" | grep -v "^#")" [ ${#subject} -le 50 ] || die "Subject too long. (<= 50)\n" -if ! echo "$subject" | grep -qE "^([-_,a-zA-Z0-9]+:)+ "; then +if ! echo "$subject" | grep -qE "^([-_,*(){}a-zA-Z0-9]+:)+ "; then die "Specify which program was modified. (e.g. \"zsh:p10k: \")\n" fi -if ! echo "$subject" | grep -qE "^([-_,a-zA-Z0-9]+:)+ [A-Z]"; then +if ! echo "$subject" | grep -qE "^([-_,*(){}a-zA-Z0-9]+:)+ [A-Z]"; then die "Start subject with a capital letter.\n" fi -if ! echo "$subject" | grep -qE "^([-_,a-zA-Z0-9]+:)+ [A-Z].*[^.]$"; then +if ! echo "$subject" | grep -qE "^([-_,*(){}a-zA-Z0-9]+:)+ [A-Z].*[^.]$"; then die "Remove punctuation mark from end.\n" fi