title: Get error message ''fatal: sha1 information is lacking or useless" when apply a patch using "git am -3"
body: <p>I am trying to apply a series of patches from 1 git repository to another git repository using git am -3 "path to a patch". I apply them in order, from patch 1-4, it works fine.</p>
  
  <p>But when I come to 5th patch,I get the error saying "fatal: sha1 information is lacking or useless". I go the to git repository where I apply the patch, I do see the file 'dev/afile'.
  So I wonder why git is complaining about "sha1 information is lacking or useless (dev/afile.c)" and how can I fix my problem?</p>
  
  <pre><code> $ git am -3 ~/Tmp/mypatches/0005-fifth.patch
  Applying: rpmsg: Allow devices to use custom buffer allocator
  fatal: sha1 information is lacking or useless (dev/afile.c).
  Repository lacks necessary blobs to fall back on 3-way merge.
  Cannot fall back to three-way merge.
  Patch failed at 0001 first patch
  When you have resolved this problem run "git am --resolved".
  If you would prefer to skip this patch, instead run "git am --skip".
  To restore the original branch and stop patching run "git am --abort".
  </code></pre>
  
  <p>And why it said "Patch failed at 0001 first patch", when I do "git am -3 ~/Tmp/mypatches/0005-fifth.patch", it completes with no error.</p>
  
  <p>Thank you.</p>