File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -85,8 +85,8 @@ read_commit_message() {
8585 REPLY=" ${REPLY%%* ( )} "
8686 shopt -u extglob
8787
88- # ignore comments
89- [[ $REPLY =~ ^# ]]
88+ # ignore comments and indented lines
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.
@@ -452,7 +452,7 @@ validate_commit_message() {
452452 candidate=" ${BASH_REMATCH[2]} "
453453 # Only warn if the candidate filename ends with .c or .h
454454 if [[ " $candidate " =~ \. (c| h)$ ]]; then
455- add_warning 1 " Avoid using just a filename like '$candidate '. Provide a functional, meaningful description"
455+ add_warning 1 " Avoid using just a filename like '$candidate '. Provide a functional, meaningful description"
456456 fi
457457 fi
458458
You can’t perform that action at this time.
0 commit comments