Skip to content

Commit b0c60d7

Browse files
committed
fix: Allow punctuations in tag:
1 parent cff1a71 commit b0c60d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hook.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ validate_commit_message() {
132132

133133
# capture the subject, and remove the 'squash! ', 'tag: ', '[tag] ' or '{tag} ' prefix if present
134134
shopt -s extglob
135-
COMMIT_SUBJECT=${COMMIT_MSG_LINES[0]/#@(+([[:alnum:]])?(\(+([[:alnum:]])\)):|\[+([[:alnum:][:punct:]])\]|\{+([[:alnum:][:punct:]])\}|squash\!) /}
135+
COMMIT_SUBJECT=${COMMIT_MSG_LINES[0]/#@(+([[:alnum:][:punct:]])?(\(+([[:alnum:][:punct:]])\)):|\[+([[:alnum:][:punct:]])\]|\{+([[:alnum:][:punct:]])\}|squash\!) /}
136136
shopt -u extglob
137137

138138
# if the commit is empty there's nothing to validate, we can return here

0 commit comments

Comments
 (0)