title: Git diff -S to show only lines that match
body: <p>I'm using <a href="http://www.brentsowers.com/2012/05/detecting-non-ascii-characters-in-git.html" rel="nofollow noreferrer">this</a> git hook for preventing commits that include non-ascii characters.</p>
  
  <p>When I find a non-ascii character, I want to print only the line with the character (and if possible the filename and line number too)</p>
  
  <pre><code>git --no-pager diff HEAD -S$char -U0
  </code></pre>
  
  <p>The --unified option will show all changes in the file, but I just want to show the lines -S found.</p>