Skip to content

Instantly share code, notes, and snippets.

@leepro
Created November 26, 2013 00:13
Show Gist options
  • Save leepro/7651250 to your computer and use it in GitHub Desktop.
Save leepro/7651250 to your computer and use it in GitHub Desktop.
git commit progress bars
#!/bin/sh
echo "================================"
echo "YYYY-MM-DD The number of commits"
echo "================================"
echo
git log --date=iso --pretty=format:"%h|%an|%ad|%s" | awk '{ split($0,a,"|"); split(a[3],b," "); print b[1]; }' | sort | uniq -c | python -c "import sys; print '\n'.join(map(lambda x:x[1]+' '+'*'*int(x[0])+' '+x[0], map(lambda x:x.strip().split(' '), sys.stdin.readlines())))" | sort -r
echo
echo "================================"
echo "Hourly The number of commits"
echo "================================"
echo
git log --date=iso --pretty=format:"%h|%an|%ad|%s" | awk '{ split($0,a,"|"); split(a[3],b," "); split(b[2],c,":"); print c[1]; }' | sort | uniq -c | python -c "import sys; print '\n'.join(map(lambda x:x[1]+' '+'*'*int(x[0])+' '+x[0], map(lambda x:x.strip().split(' '), sys.stdin.readlines())))" | sort
echo
echo "================================"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment