title: `git submodule update` doesn't checkout the commit in the submodule
body: <p>I've got following problem: When I'm checkout out a specific commit of the superproject and run <code>git update submodules</code>, the commit of the submodule is not checked out, although that is what this command should do according to the manpage, internet blog posts and so on. I still manually have to run <code>git submodule &lt;path/to/submodule&gt;</code> to check the correct commit out.</p>
  
  <p>Does anyone know what I could be that makes git behave that way? I'm using <code>git version 2.11.0</code>.</p>
  
  <hr>
  
  <p>Working tree is clean.</p>
  
  <pre><code>manuel@manuelthinkpad:~/projects/testcompile/superproject$ git status
  HEAD detached at origin/master
  nothing to commit, working tree clean
  </code></pre>
  
  <p>The right commit for submodule <code>problematic_submodule</code> is checked out. (Its line is not prefixed with <code>+</code>/<code>-</code>.)</p>
  
  <pre><code>manuel@manuelthinkpad:~/projects/testcompile/superproject$ git submodule
  +321fce0da25208bf886d85ce4a2f1cefc02bbfff modules/libgksl (v1.2-9-g321fce0)
   ... some other modules ...
   9acb4a5d28d1ac785fce17799d58e21cc437b77d modules/problematic_submodule (v0.19-3355-g9acb4a5d2)
  </code></pre>
  
  <p>I'm checkout out the local master of the superproject, which is not yet pushed:</p>
  
  <pre><code>manuel@manuelthinkpad:~/projects/testcompile/superproject$ git checkout master
  Previous HEAD position was 4b58c94... Merge branch 'dev' into 'master'
  Switched to branch 'master'
  Your branch is ahead of 'origin/master' by 1 commit.
    (use "git push" to publish your local commits)
  </code></pre>
  
  <p>Now I want to update the submodules so they have the correct commits checked out:</p>
  
  <pre><code>manuel@manuelthinkpad:~/projects/testcompile/superproject$ git submodule update --recursive
  Fetched in submodule path 'modules/libgksl', but it did not contain a20f22f989afbcbb620303a6b418de8093c71259. Direct fetching of that commit failed.
  </code></pre>
  
  <p>Alas, <code>problematic_submodule</code> is still on the wrong commit. (Note that the line is prefixed with an <code>+</code>.)</p>
  
  <pre><code>manuel@manuelthinkpad:~/projects/testcompile/superproject$ git submodule
  +321fce0da25208bf886d85ce4a2f1cefc02bbfff modules/libgksl (v1.2-9-g321fce0)
   ... some other modules ...
  +9acb4a5d28d1ac785fce17799d58e21cc437b77d modules/problematic_submodule (v0.19-3355-g9acb4a5d2)
  </code></pre>
  
  <p>I have to specify <code>problematic_submodule</code> so it gets checked out:</p>
  
  <pre><code>manuel@manuelthinkpad:~/projects/testcompile/superproject$ git submodule update modules/problematic_submodule/
  Submodule path 'modules/problematic_submodule': checked out '24b46f28edf9c75bf8a7bcf4cac7aa65564c88c9'
  </code></pre>
  
  <p>Only now the correct commit of <code>problematic_submodule</code> is checked out. (The line is no longer prefixed with an <code>+</code>.)</p>
  
  <pre><code>manuel@manuelthinkpad:~/projects/testcompile/superproject$ git submodule
  +321fce0da25208bf886d85ce4a2f1cefc02bbfff modules/libgksl (v1.2-9-g321fce0)
   ... some other modules
   24b46f28edf9c75bf8a7bcf4cac7aa65564c88c9 modules/problematic_submodule (v0.19-3551-g24b46f28e)
  </code></pre>