Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Plotting the source code “TODO” history of the most popular open source projects. Parent comment
git --no-pager grep -I --full-name --line-number 'TODO' |\ sed 's/\(^[^:]*\):\([0-9]\+\):.*/\1\n\2/' |\ xargs -d '\n' -n2 sh -c 'git --no-pager blame "$0" -L $1,$1'
What it does:
1) git-grep for files that are checked in, not "binary" that contain the string 'TODO'
2) sed away the actual line contents (git-grep doesn't seem able to only output file:line-nr)
3) use xargs and sh to call git blame on that file:line-nr
This shows the last time the TODO line was modified, ie: it may have been created 10 years ago but somebody modified the last yesterday
edit: one might want to throw in --cached to git-grep to search the index and not just the current working-tree
There are no comments on this comment yet.
What it does:
1) git-grep for files that are checked in, not "binary" that contain the string 'TODO'
2) sed away the actual line contents (git-grep doesn't seem able to only output file:line-nr)
3) use xargs and sh to call git blame on that file:line-nr
This shows the last time the TODO line was modified, ie: it may have been created 10 years ago but somebody modified the last yesterday
edit: one might want to throw in --cached to git-grep to search the index and not just the current working-tree