Skip to content

Instantly share code, notes, and snippets.

@nulpunkt
Created October 27, 2014 10:48
Show Gist options
  • Select an option

  • Save nulpunkt/92bc464d86a54622e223 to your computer and use it in GitHub Desktop.

Select an option

Save nulpunkt/92bc464d86a54622e223 to your computer and use it in GitHub Desktop.

Revisions

  1. nulpunkt created this gist Oct 27, 2014.
    7 changes: 7 additions & 0 deletions oldest_todo.bash
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    git grep -n -w "FIXME\|TODO\|XXX" | awk '{ print $1 }' | while read fileline; do
    filename=`echo $fileline | cut -d: -f1`
    lineno=`echo $fileline | cut -d: -f2`
    time=`git blame -p -t $filename -L$lineno,$lineno | grep author-time | cut -d' ' -f2`
    msg=`git blame $filename -L$lineno,$lineno`
    echo "$time $fileline $msg"
    done | sort | cut -d' ' -f1-