File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -85,8 +85,8 @@ read_commit_message() {
85
85
REPLY=" ${REPLY%%* ( )} "
86
86
shopt -u extglob
87
87
88
- # ignore comments
89
- [[ $REPLY =~ ^# ]]
88
+ # ignore comments and indented lines
89
+ [[ $REPLY =~ ^( # |[ ][ ]) ]]
90
90
test $? -eq 0 || COMMIT_MSG_LINES+=(" $REPLY " )
91
91
92
92
[[ $REPLY =~ " # ------------------------ >8 ------------------------" ]]
@@ -208,7 +208,7 @@ build_commit_trailer_regex() {
208
208
TRAILER_REGEX+=" $each |"
209
209
done
210
210
# 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:]]*"
212
212
fi
213
213
214
214
# Append standalone trailer keys.
@@ -452,7 +452,7 @@ validate_commit_message() {
452
452
candidate=" ${BASH_REMATCH[2]} "
453
453
# Only warn if the candidate filename ends with .c or .h
454
454
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"
456
456
fi
457
457
fi
458
458
You can’t perform that action at this time.
0 commit comments