Skip to content

Commit a74d387

Browse files
authored
Merge pull request #220 from Dennis40816/unify_commit_msg_lines
Fix commit hook breakage
2 parents 10875f2 + ff5e2b7 commit a74d387

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/commit-msg.hook

+3-3
Original file line numberDiff line numberDiff line change
@@ -349,15 +349,15 @@ validate_commit_message() {
349349
URL_REGEX='^[[:blank:]]*(https?|ftp|file)://[-A-Za-z0-9+&@#/%?=~_|!:,.;]*[-A-Za-z0-9+&@#/%=~_|]'
350350

351351
# Ensure the commit message lines are loaded into an array.
352-
readarray -t commit_msg_lines < "$COMMIT_MSG_FILE"
352+
readarray -t COMMIT_MSG_LINES < "$COMMIT_MSG_FILE"
353353

354-
for i in "${!commit_msg_lines[@]}"; do
354+
for i in "${!COMMIT_MSG_LINES[@]}"; do
355355
# Skip the first line (the subject) since the limit applies to the body.
356356
if [ "$i" -eq 0 ]; then
357357
continue
358358
fi
359359

360-
line="${commit_msg_lines[$i]}"
360+
line="${COMMIT_MSG_LINES[$i]}"
361361

362362
# Skip lines that are comments.
363363
if [[ "$line" =~ ^[[:space:]]*# ]]; then

0 commit comments

Comments
 (0)