Last active
October 20, 2023 13:04
-
-
Save crowjdh/dc072fc362c063ea6ede0d3dcb3808c8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
line_lengths=($(git log --pretty=format:%s | awk '{ print length($0) - 9 }')) | |
sum=0 | |
line_count=${#line_lengths} | |
for line_length in ${line_lengths[@]}; do | |
sum=$((sum + line_length)) | |
done | |
echo "Total $line_count commits" | |
echo "$((sum / line_count)) chars per commit in average" | |
# For debugging | |
# echo ${line_lengths[@]} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment