> Le 3 mars 2020 à 12:26, Damien Robert <damien.olivier.robert@xxxxxxxxx> a écrit : > >>> + work trees of submodules will not be updated. Just like >>> + linkgit:git-submodule[1], this will detach `HEAD` of the submodule. > >> In fact `git submodule` does not unconditionally detach the submodules HEAD >> (if `git submodule update` is invoked and a branch is checked out in the submodule that points >> to the same commit as the one recorded in the superproject, the HEAD is not detached and the branch >> stays checked out unless `--force` is given.) So I would instead link to `checkout`, >> which does unconditionally detach the submodules HEAD. > > Ok. I copied the above line from git-switch[1]. Should I also update it? > git-checkout[1] also says that git-submodule will detach HEAD by the way. I would say yes: git-switch(1) should be updated to refer to git-checkout(1) instead of git-submodule(1), and git-checkout(1) should drop the reference to git-submodule(1) and just say that it will detach the submodule HEAD. Maybe in a separate patch before this one ?