Created
December 12, 2022 13:12
-
-
Save CJHwong/7bb70be81e08a2615a42e7ea1a7d935c to your computer and use it in GitHub Desktop.
This file contains 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
ALL_FILES=$(git ls-files) | |
echo "filename,commit_ct,last_updated_at" | |
while IFS= read -r FILENAME | |
do | |
COMMIT_CT=$(git --no-pager log --pretty=tformat:"%h" ${FILENAME} | wc -l | sed 's/ //g') | |
LATEST_UPDATED_AT=$(git --no-pager log -1 --pretty="format:%ci" $FILENAME) | |
echo "${FILENAME},${COMMIT_CT},${LATEST_UPDATED_AT}" | |
done < <(printf '%s\n' "$ALL_FILES") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment