title: Searching files with pre-commit
body: <p>I am trying to add a git pre-commit hook that will check all changed and new file for <code>TODO:</code> text.</p>
  
  <p>I tried </p>
  
  <pre><code>#!/bin/sh
  
  . git-sh-setup  # for die 
  git-diff-index -p -M --cached HEAD -- | grep '^+' |
  grep TODO: &amp;&amp; die Blocking commit because string TODO: detected in patch
  :
  </code></pre>
  
  <p>That i saw in a similar question, but no luck.</p>