Re: [PATCH 2/4] doc: document --recurse-submodules for reset and restore
- From
Philippe Blain <levraiphilippeblain@gmail.com>
- Date
- Mar 6, 2020, 04:16 UTC
- Message-ID
- <DEF5103D-C687-4EAB-BFF9-58267093B456@gmail.com>
- In-Reply-To
- <20200303172613.vmd47i5bcwg56vyt@feanor>
Show 13 quoted lines
> Le 3 mars 2020 à 12:26, Damien Robert <damien.olivier.robert@gmail.com> 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 ?