Thread (58 messages) 58 messages, 2 authors, 2020-04-16

[PATCH 2/4] doc: document --recurse-submodules for reset and restore

flat view
STALE2391d SUPERSEDED

From: Damien Robert <hidden>
Date: 2020-02-28 10:37:25
Subsystem: documentation, the rest · Maintainers: Jonathan Corbet, Linus Torvalds

Status: Superseded by v6 (posted 2020-04-06). [go to v6]

Revision v1 (6 revisions archived).

Revisions (6)
  1. v1 current
  2. v2 [diff against previous]
  3. v3 [diff against previous]
  4. v4 [diff against previous]
  5. v5 [diff against previous]
  6. v6 [diff against previous]
Signed-off-by: Damien Robert <redacted>
---
 Documentation/git-reset.txt   | 6 ++++++
 Documentation/git-restore.txt | 9 +++++++++
 2 files changed, 15 insertions(+)
diff --git a/Documentation/git-reset.txt b/Documentation/git-reset.txt
index 932080c55d..838c0f1101 100644
--- a/Documentation/git-reset.txt
+++ b/Documentation/git-reset.txt
@@ -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 content 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
diff --git a/Documentation/git-restore.txt b/Documentation/git-restore.txt
index 5bf60d4943..b94b2559c7 100644
--- a/Documentation/git-restore.txt
+++ b/Documentation/git-restore.txt
@@ -107,6 +107,15 @@ in linkgit:git-checkout[1] for details.
 	patterns and unconditionally restores any files in
 	`<pathspec>`.
 
+--recurse-submodules::
+--no-recurse-submodules::
+	Using `--recurse-submodules` will update the content of all
+	restored submodules according to the commit recorded in the
+	superproject. Local modifications in a restored submodule are
+	overwritten. If nothing (or `--no-recurse-submodules`) is used, the
+	work trees of submodules will not be updated. Just like
+	linkgit:git-submodule[1], this will detach `HEAD` of the submodule.
+
 --overlay::
 --no-overlay::
 	In overlay mode, the command never removes files when
-- 
Patched on top of v2.25.1-377-g2d2118b814 (git version 2.25.1)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help