]> git.ipfire.org Git - thirdparty/git.git/commitdiff
doc: document --recurse-submodules for reset and restore
authorDamien Robert <damien.olivier.robert@gmail.com>
Mon, 6 Apr 2020 13:57:06 +0000 (15:57 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 6 Apr 2020 20:42:43 +0000 (13:42 -0700)
Also unify the formulation about --no-recurse-submodules for checkout
and switch, which we reuse for restore.

And correct the formulation about submodules' HEAD in read-tree, which
we reuse in reset.

Signed-off-by: Damien Robert <damien.olivier.robert+git@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-checkout.txt
Documentation/git-read-tree.txt
Documentation/git-reset.txt
Documentation/git-restore.txt
Documentation/git-switch.txt

index c8fb995fa74ee9262ddd71514aeb250376d30a1b..140bd3eabbf83c2f068880ac55080b40ed82f421 100644 (file)
@@ -296,7 +296,7 @@ Note that this option uses the no overlay mode by default (see also
        submodules according to the commit recorded in the superproject. If
        local modifications in a submodule would be overwritten the checkout
        will fail unless `-f` is used. If nothing (or `--no-recurse-submodules`)
-       is used, the work trees of submodules will not be updated.
+       is used, submodules working trees will not be updated.
        Just like linkgit:git-submodule[1], this will detach `HEAD` of the
        submodule.
 
index da33f84f33d2c5869ce730169ff0f0f23edd42d1..501f2ec375d6909d134e290a4a6a7c46c139951e 100644 (file)
@@ -118,7 +118,7 @@ OPTIONS
 --[no-]recurse-submodules::
        Using --recurse-submodules will update the content of all initialized
        submodules according to the commit recorded in the superproject by
-       calling read-tree recursively, also setting the submodules HEAD to be
+       calling read-tree recursively, also setting the submodules' HEAD to be
        detached at that commit.
 
 --no-sparse-checkout::
index 932080c55d2c232236c630a26c9968874882b1f3..252e2d4e47d10404226cce6abfc0132a4d2e9b74 100644 (file)
@@ -87,6 +87,12 @@ but carries forward unmerged index entries.
        different between `<commit>` and `HEAD`.
        If a file that is different between `<commit>` and `HEAD` has local
        changes, reset is aborted.
+
+--[no-]recurse-submodules::
+       When the working tree is updated, using --recurse-submodules will
+       also recursively reset the working tree of all active submodules
+       according to the commit recorded in the superproject, also setting
+       the submodules' HEAD to be detached at that commit.
 --
 
 See "Reset, restore and revert" in linkgit:git[1] for the differences
index 5bf60d49434109918fedbc6dd9051a2f65d24316..8e3b33980281336765ac1749cfe6add3ce9cda4e 100644 (file)
@@ -107,6 +107,17 @@ in linkgit:git-checkout[1] for details.
        patterns and unconditionally restores any files in
        `<pathspec>`.
 
+--recurse-submodules::
+--no-recurse-submodules::
+       If `<pathspec>` names an active submodule and the restore location
+       includes the working tree, the submodule will only be updated if
+       this option is given, in which case its working tree will be
+       restored to the commit recorded in the superproject, and any local
+       modifications overwritten. If nothing (or
+       `--no-recurse-submodules`) is used, submodules working trees will
+       not be updated. Just like linkgit:git-checkout[1], this will detach
+       `HEAD` of the submodule.
+
 --overlay::
 --no-overlay::
        In overlay mode, the command never removes files when
index 197900363b0b7daa273fc2b39f7bed6961f08e09..79dbc9624ddffe88210a594ff9b66a1048c7a310 100644 (file)
@@ -183,7 +183,7 @@ name, the guessing is aborted.  You can explicitly give a name with
        Using `--recurse-submodules` will update the content of all
        initialized submodules according to the commit recorded in the
        superproject. If nothing (or `--no-recurse-submodules`) is
-       used, the work trees of submodules will not be updated. Just
+       used, submodules working trees will not be updated. Just
        like linkgit:git-submodule[1], this will detach `HEAD` of the
        submodules.