Created
March 26, 2020 00:03
-
-
Save syohex/2a4a367ed00ea0fd9c931e62977b0c64 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
#!/usr/bin/env bash | |
set -e | |
declare -A counts | |
for file in $(git ls-files) | |
do | |
count=$(git shortlog -s -n --all --no-merges $file | wc -l) | |
counts[$file]=$count | |
done | |
max=-1 | |
max_file= | |
for k in "${!counts[@]}" | |
do | |
if [[ ${counts[$k]} -gt $max ]]; then | |
max=${counts[$k]} | |
max_file=$k | |
fi | |
done | |
printf "Most people modify $max_file($max people)\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment