title: git "expected shallow list" error when shallow had tested as true
body: <p>I have a repo that, when tested on Travis, consistently gives an error like:</p>
  
  <pre><code>$ if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
  fatal: git fetch-pack: expected shallow list
  The command "if [[ -a .git/shallow ]]; then git fetch --unshallow; fi" failed and exited with 128 during .
  Your build has been stopped.
  </code></pre>
  
  <p>You can see <a href="https://travis-ci.org/JuliaGraphics/Immerse.jl/builds/83426931" rel="noreferrer">an example here</a>, although it's possible that link requires authorization.</p>
  
  <p>What I find strange about this that it seems the <code>git fetch --unshallow</code> should run only if it's already determined that it is shallow. I should add that I've used this construct in many other repositories and never had a problem.</p>
  
  <p>On my local machine, the contents of <code>.git</code> are:</p>
  
  <pre><code>myrepo.git$ ls -a
  .   branches        config       FETCH_HEAD  HEAD   index  logs     ORIG_HEAD                                                        
  ..  COMMIT_EDITMSG  description  gitk.cache  hooks  info   objects  refs
  </code></pre>