title: sparse checkout gives me an error stderr: fatal: Not a valid object name HEAD
body: <p>When I try to do a GIT sparse checkout in Jenkins, I get the following error:</p>
  
  <pre><code> &gt; git rev-parse refs/remotes/origin/master^{commit} # timeout=10
   &gt; git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
  Checking out Revision b1697de347cafa3afbd9efc364b2874994e88b0e (refs/remotes/origin/master)
   &gt; git config core.sparsecheckout # timeout=10
   &gt; git config core.sparsecheckout true # timeout=10
   &gt; git read-tree -mu HEAD # timeout=10
  Command "git read-tree -mu HEAD" returned status code 128:
  stdout: 
  stderr: fatal: Not a valid object name HEAD
  </code></pre>
  
  <p>I'm using the Multiple SCM plugin that Jenkins provides. </p>
  
  <p>The files get copied to the directory, so I'm not sure why I'm getting the error.</p>
  
  <p>The node is running on Centos 7 </p>