Created
September 11, 2012 19:17
-
-
Save heim/3701173 to your computer and use it in GitHub Desktop.
repo-size.sh
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/bash | |
set -e | |
function main() { | |
git rev-list --reverse --since="6 months ago" HEAD | | |
while read rev; do | |
echo "`revision_time`, `line_count`" | |
done | |
} | |
function line_count() { | |
git ls-tree -r $rev | | |
awk '{print $3}' | | |
xargs git show | | |
wc -l | |
} | |
function revision_time() { | |
git log -1 $rev --pretty=format:"%ai" | |
} | |
main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment