Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7ffda90

Browse files
committed
Fix ignoring indented lines in commit messages
Change-Id: If974372abff9cd3648a11c23667e35858a2706aa
1 parent 3781100 commit 7ffda90

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎scripts/commit-msg.hook

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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 ------------------------" ]]
@@ -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

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /