Skip to content

Commit ff5e2b7

Browse files
committed
Change 'commit_msg_lines' to 'COMMIT_MSG_LINES'
The functionality introduced in commit d39d920 was broken due to changes introduced in commit 4a8b8d5, where some occurrences of 'COMMIT_MSG_LINES' were replaced with 'commit_msg_lines' without updating all relevant functions. This commit fixes the issue by replacing all instances of 'commit_msg_lines' with 'COMMIT_MSG_LINES', ensuring consistency and restoring the intended functionality. Change-Id: I0c93617be83c5f24b1e17678566883c0481ddc48
1 parent 7db0d54 commit ff5e2b7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/commit-msg.hook

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

362362
# Ensure the commit message lines are loaded into an array.
363-
readarray -t commit_msg_lines < "$COMMIT_MSG_FILE"
363+
readarray -t COMMIT_MSG_LINES < "$COMMIT_MSG_FILE"
364364

365-
for i in "${!commit_msg_lines[@]}"; do
365+
for i in "${!COMMIT_MSG_LINES[@]}"; do
366366
# Skip the first line (the subject) since the limit applies to the body.
367367
if [ "$i" -eq 0 ]; then
368368
continue
369369
fi
370370

371-
line="${commit_msg_lines[$i]}"
371+
line="${COMMIT_MSG_LINES[$i]}"
372372

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

0 commit comments

Comments
 (0)