Count characters, not just lines

This commit is contained in:
Oliver Davies 2024-05-21 17:44:01 +01:00 committed by GitHub
parent cf80c7e5b1
commit 379534ce60
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -27,7 +27,7 @@ if [[ ! -f "${result_file}" ]]; then
# Calculate the legnth of the commit message.
commit_message=$(GIT_PAGER=cat git -C "${REPO}" show "${commit_id}" -s --format=%B)
commit_message_length=$(echo "${commit_message}" | wc -l)
commit_message_length=$(echo "${commit_message}" | wc --chars)
# Store the commit IDs and the message length.
echo "${commit_message_length} ${commit_id}" >> "${result_file}"