title: Git repository without refs directory but with packed-refs file is invalid
body: <p>Somehow, I got into a state where I had some git repos that didn't have a <code>refs</code> directory, but did have a <code>packed-refs</code> file. When trying to use those repos, git would immediately error out with:</p>
  
  <pre><code>fatal: not a git repository (or any of the parent directories): .git
  </code></pre>
  
  <p>All I had to do was make an empty <code>refs</code> directory, and git would work, and even report all the information about branches stored in the <code>packed-refs</code> files.</p>
  
  <p>Should a git repo without a <code>refs</code> directory, but with a <code>packed-refs</code> file really be considered invalid? How did my repos even get into this situation?</p>
  
  <p>These repos were ones used by <code>bundler</code>. For example, they were at:</p>
  
  <pre><code>/usr/local/lib/ruby/gems/2.3.0/cache/bundler/git/resque-841a12220f681ab6c7edba71d186ddfb64ee193f
  </code></pre>
  
  <p>Removing those directories, or creating the empty <code>refs</code> dirs under them did the trick. It's still just confusing why this would happen.</p>