title: git diff not working with Word document, --intent-to-add, and pandoc diff driver
body: <p>Several tutorials (<a href="http://blog.martinfenner.org/2014/08/25/using-microsoft-word-with-git/" rel="nofollow noreferrer">[1]</a>, <a href="https://github.com/vigente/gerardus/wiki/Integrate-git-diffs-with-word-docx-files" rel="nofollow noreferrer">[2]</a>, <a href="http://hrishioa.github.io/tracking-word-documents-with-git/" rel="nofollow noreferrer">[3]</a>) that can be found on the internet suggest the following configuration for diffing Word documents tracked by <code>git</code>.</p>
  
  <ol>
  <li><p>Configure a "pandoc" diff driver with the following settings:</p>
  
  <pre><code>[diff "pandoc"]
      textconv=pandoc --to=markdown
      prompt = false
  </code></pre></li>
  <li><p>Add the following to your <code>.gitattributes</code> file:</p>
  
  <pre><code>*.docx diff=pandoc
  </code></pre></li>
  </ol>
  
  <p>This seems to work fine except when trying to diff an untracked Word document after indicating intent to add it to the git repository. Does anyone know why this isn't working in this case?</p>
  
  <p>Here are the steps to reproduce, assuming the following configuration detailed above.</p>
  
  <ol>
  <li><p>Create a Word document in a git repository</p>
  
  <pre><code>touch my_document.docx
  </code></pre></li>
  <li><p>Open the file in Microsoft Word, add some content to the Word document (<em>e.g</em>, the characters "asdf"), and save it</p></li>
  <li><p>Indicate your intent to add the document</p>
  
  <pre><code>git add -N my_document.docx
  </code></pre></li>
  <li><p>Try to see the diff:</p>
  
  <pre><code>git diff my_document.docx
  #&gt; couldn't parse docx file
  #&gt; fatal: unable to read files to diff
  </code></pre></li>
  </ol>
  
  <p>With <code>git</code> version 2.17.1 on macOS, I end up with a "fatal: unable to read files to diff" error. However, just adding the file to the index and then running <code>git diff --cached</code> results in the following diff:</p>
  
  <pre><code>diff --git a/my_document.docx b/my_document.docx
  new file mode 100644
  index 0000000..17f1b0d
  --- /dev/null
  +++ b/my_document.docx
  @@ -0,0 +1 @@
  +asdf
  </code></pre>
  
  <p>Why doesn't the diff driver work with <code>git add -N</code>?</p>