title: Is it possible to git-diff a file against standard input?
body: <p>Let's say I'm editing a file.  If I save the file, <code>git-diff</code> will give me its changes relative to the index.  I'd like to get the changes relative to the index without saving the file first – for a "realtime" diff.</p>
  
  <p>One solution is to write the unsaved changes to a temporary file (i.e. save the file elsewhere), write the staged file to another temporary file (<code>git show :file &gt; tempfile2</code>) then <code>git-diff tempfile tempfile2</code>.  However that seems inelegant.</p>
  
  <p>Is there a better way?</p>