Created
April 9, 2013 11:40
-
-
Save saurabhnanda/5345025 to your computer and use it in GitHub Desktop.
Count the number of lines with the words TODO or HACK in each commit in a git repository.
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
#!/bin/bash | |
# The output of the following command was piped into the STDIN of this script: | |
# git log --before="2012-07-07" --format="format:%H %ai" > sha1 | |
while read sha1 dt tm tz; do | |
git checkout -q $sha1; | |
cnt=`egrep -ri 'todo|hack' app lib|wc -l|tr -d ' '` | |
echo "$dt $tm,$cnt" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment