@@ -86,7 +86,7 @@ read_commit_message() {
8686 shopt -u extglob
8787
8888 # ignore comments and indented lines
89- [[ $REPLY =~ ^(# |[ ][ ] ) ]]
89+ [[ $REPLY =~ ^(# |) ]]
9090 test $? -eq 0 || COMMIT_MSG_LINES+=(" $REPLY " )
9191
9292 [[ $REPLY =~ " # ------------------------ >8 ------------------------" ]]
@@ -208,7 +208,7 @@ build_commit_trailer_regex() {
208208 TRAILER_REGEX+=" $each |"
209209 done
210210 # Remove the trailing pipe, then add a separator and blank space pattern.
211- TRAILER_REGEX=" ${TRAILER_REGEX% |} )[$separators ][[:blank:]]*"
211+ TRAILER_REGEX=" ${TRAILER_REGEX% |} )[$separators ][[:blank:]]*) "
212212 fi
213213
214214 # Append standalone trailer keys.
@@ -483,7 +483,8 @@ validate_commit_message() {
483483
484484 MSG_FOR_SPELLCHECK_LINE_FINDING=$( echo " $FULL_COMMIT_MSG_WITH_SPACE " | sed -E \
485485 -e " s/(['\" ][^'\" ]*['\" ])//g" \
486- -e " s/\bcommit[[:space:]]+[0-9a-fA-F]{7,40}\b/commit/g" )
486+ -e " s/\bcommit[[:space:]]+[0-9a-fA-F]{7,40}\b/commit/g" \
487+ -e " /^ /d" )
487488 MSG_FOR_SPELLCHECK=$( echo " $MSG_FOR_SPELLCHECK_LINE_FINDING " | sed ' /^[[:space:]]*$/d' )
488489
489490 # Use aspell to list misspelled words according to American English, ignoring quoted text.
0 commit comments