git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v4 5/5] doc: --recurse-submodules mostly applies to active submodules

From
DRDamien Robert <damien.olivier.robert@gmail.com>
Date
Mar 25, 2020, 21:09 UTC
Message-ID
<20200325210943.339240-6-damien.olivier.robert+git@gmail.com>
In-Reply-To
<20200325210943.339240-1-damien.olivier.robert+git@gmail.com>

The documentation refers to "initialized" or "populated" submodules, to explain which submodules are affected by '--recurse-submodules', but the real terminology here is 'active' submodules. Update the documentation accordingly.

Some terminology:
- Active is defined in gitsubmodules(7), it only involves the
  configuration variables 'submodule.active', 'submodule.<name>.active'
  and 'submodule.<name>.url'. The function
  submodule.c::is_submodule_active checks that a submodule is active.
- Populated means that the submodule's working tree is present (and the
  gitfile correctly points to the submodule repository), i.e. either the
  superproject was cloned with ` --recurse-submodules`, or the user ran
  `git submodule update --init`, or `git submodule init [<path>]` and
  `git submodule update [<path>]` separately which populated the
  submodule working tree. This does not involve the 3 configuration
  variables above.
- Initialized (at least in the context of the man pages involved in this
  patch) means both "populated" and "active" as defined above, i.e. what
  `git submodule update --init` does.

The --recurse-submodules option mostly affects active submodules. An exception is `git fetch` where the option affects populated submodules. As a consequence, in `git pull --recurse-submodules` the fetch affects populated submodules, but the resulting working tree update only affects active submodules.

In the documentation of `git-pull`, let's distinguish between the fetching part which affects populated submodules, and the updating of worktrees, which only affects active submodules.

Signed-off-by: Damien Robert <damien.olivier.robert+git@gmail.com>
Helped-by: Philippe Blain <levraiphilippeblain@gmail.com>
---
 Documentation/git-checkout.txt  | 2 +-
 Documentation/git-grep.txt      | 2 +-
 Documentation/git-ls-files.txt  | 2 +-
 Documentation/git-pull.txt      | 6 ++++--
 Documentation/git-read-tree.txt | 2 +-
 Documentation/git-switch.txt    | 2 +-
 6 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt
index 140bd3eabb..5b697eee1b 100644
--- a/Documentation/git-checkout.txt
+++ b/Documentation/git-checkout.txt
@@ -292,7 +292,7 @@ Note that this option uses the no overlay mode by default (see also
 
 --recurse-submodules::
 --no-recurse-submodules::
-	Using `--recurse-submodules` will update the content of all initialized
+	Using `--recurse-submodules` will update the content of all active
 	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`)
diff --git a/Documentation/git-grep.txt b/Documentation/git-grep.txt
index ddb6acc025..cdf8e26b47 100644
--- a/Documentation/git-grep.txt
+++ b/Documentation/git-grep.txt
@@ -93,7 +93,7 @@ OPTIONS
 	with `--no-index`.
 
 --recurse-submodules::
-	Recursively search in each submodule that has been initialized and
+	Recursively search in each submodule that is active and
 	checked out in the repository.  When used in combination with the
 	<tree> option the prefix of all submodule output will be the name of
 	the parent project's <tree> object. This option has no effect
diff --git a/Documentation/git-ls-files.txt b/Documentation/git-ls-files.txt
index 8461c0e83e..3cb2ebb438 100644
--- a/Documentation/git-ls-files.txt
+++ b/Documentation/git-ls-files.txt
@@ -148,7 +148,7 @@ a space) at the start of each line:
 	top directory.
 
 --recurse-submodules::
-	Recursively calls ls-files on each submodule in the repository.
+	Recursively calls ls-files on each active submodule in the repository.
 	Currently there is only support for the --cached mode.
 
 --abbrev[=<n>]::
diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt
index 47bc4a7061..b336df00c7 100644
--- a/Documentation/git-pull.txt
+++ b/Documentation/git-pull.txt
@@ -85,8 +85,10 @@ OPTIONS
 	Pass --verbose to git-fetch and git-merge.
 
 --[no-]recurse-submodules[=yes|on-demand|no]::
-	This option controls if new commits of all populated submodules should
-	be fetched and updated, too (see linkgit:git-fetch[1], linkgit:git-config[1] and linkgit:gitmodules[5]).
+	This option controls if new commits of populated submodules should
+	be fetched, and if the working trees of active submodules should be
+	updated, too (see linkgit:git-fetch[1], linkgit:git-config[1] and
+	linkgit:gitmodules[5]).
 +
 If the checkout is done via rebase, local submodule commits are rebased as well.
 +
diff --git a/Documentation/git-read-tree.txt b/Documentation/git-read-tree.txt
index 807cad4691..a2350994ee 100644
--- a/Documentation/git-read-tree.txt
+++ b/Documentation/git-read-tree.txt
@@ -116,7 +116,7 @@ OPTIONS
 	located in.
 
 --[no-]recurse-submodules::
-	Using --recurse-submodules will update the content of all initialized
+	Using --recurse-submodules will update the content of all active
 	submodules according to the commit recorded in the superproject by
 	calling read-tree recursively, also setting the submodules' HEADs to be
 	detached at that commit.
diff --git a/Documentation/git-switch.txt b/Documentation/git-switch.txt
index 79dbc9624d..3759c3a265 100644
--- a/Documentation/git-switch.txt
+++ b/Documentation/git-switch.txt
@@ -181,7 +181,7 @@ name, the guessing is aborted.  You can explicitly give a name with
 --recurse-submodules::
 --no-recurse-submodules::
 	Using `--recurse-submodules` will update the content of all
-	initialized submodules according to the commit recorded in the
+	active submodules according to the commit recorded in the
 	superproject. If nothing (or `--no-recurse-submodules`) is
 	used, submodules working trees will not be updated. Just
 	like linkgit:git-submodule[1], this will detach `HEAD` of the
-- 
Patched on top of v2.26.0 (git version 2.25.2)
Previous: Damien RobertNext: Damien Robert
Message 50 of 62 in “doc: --recurse-submodules”
  1. 0/4 doc: --recurse-submodulesDamien Robert, Feb 28, 2020
  2. 1/4 doc: list all commands affected by recurse.submoduleDamien Robert, Feb 28, 2020
  3. Philippe BlainMar 2, 2020
  4. Damien RobertMar 3, 2020
  5. 2/4 doc: document --recurse-submodules for reset and restoreDamien Robert, Feb 28, 2020
  6. Philippe BlainMar 2, 2020
  7. Damien RobertMar 3, 2020
  8. Philippe BlainMar 6, 2020
  9. 3/4 doc: explain how to deactivate recurse.submodule completelyDamien Robert, Feb 28, 2020
  10. Philippe BlainMar 2, 2020
  11. 4/4 doc: be more precise on (fetch|pull).recurseSubmodulesDamien Robert, Feb 28, 2020
  12. Philippe BlainMar 2, 2020
  13. Damien RobertFeb 28, 2020
  14. Philippe BlainMar 3, 2020
  15. Philippe BlainMar 2, 2020
  16. 0/5 doc: --recurse-submodulesDamien Robert, Mar 3, 2020
  17. 1/5 doc: list all commands affected by submodule.recurseDamien Robert, Mar 3, 2020
  18. 2/5 doc: document --recurse-submodules for reset and restoreDamien Robert, Mar 3, 2020
  19. Junio C HamanoMar 3, 2020
  20. Philippe BlainMar 6, 2020
  21. 3/5 doc: explain how to deactivate recurse.submodule completelyDamien Robert, Mar 3, 2020
  22. Junio C HamanoMar 3, 2020
  23. Robert P. J. DayMar 3, 2020
  24. Damien RobertMar 3, 2020
  25. Philippe BlainMar 6, 2020
  26. 4/5 doc: be more precise on (fetch|push).recurseSubmodulesDamien Robert, Mar 3, 2020
  27. Junio C HamanoMar 3, 2020
  28. Robert P. J. DayMar 3, 2020
  29. 5/5 doc: --recurse-submodules only apply to active submodulesDamien Robert, Mar 3, 2020
  30. Philippe BlainMar 6, 2020
  31. Damien RobertMar 20, 2020
  32. 0/5 doc: --recurse-submodulesDamien Robert, Mar 20, 2020
  33. 2/5 doc: document --recurse-submodules for reset and restoreDamien Robert, Mar 20, 2020
  34. Philippe BlainMar 22, 2020
  35. Damien RobertMar 25, 2020
  36. 3/5 doc: explain how to deactivate submodule.recurse completelyDamien Robert, Mar 20, 2020
  37. Philippe BlainMar 22, 2020
  38. 4/5 doc: be more precise on (fetch|push).recurseSubmodulesDamien Robert, Mar 20, 2020
  39. Philippe BlainMar 22, 2020
  40. Junio C HamanoMar 22, 2020
  41. Philippe BlainMar 22, 2020
  42. 5/5 doc: --recurse-submodules mostly only apply to active submodulesDamien Robert, Mar 20, 2020
  43. Philippe BlainMar 22, 2020
  44. 1/5 doc: list all commands affected by submodule.recurseDamien Robert, Mar 20, 2020
  45. 0/5 doc: --recurse-submodulesDamien Robert, Mar 25, 2020
  46. 1/5 doc: list all commands affected by submodule.recurseDamien Robert, Mar 25, 2020
  47. 2/5 doc: document --recurse-submodules for reset and restoreDamien Robert, Mar 25, 2020
  48. Philippe BlainMar 29, 2020
  49. 3/5 doc: explain how to deactivate submodule.recurse completelyDamien Robert, Mar 25, 2020
  50. 5/5 doc: --recurse-submodules mostly applies to active submodulesDamien Robert, Mar 25, 2020
  51. 4/5 doc: be more precise on (fetch|push).recurseSubmodulesDamien Robert, Mar 25, 2020
  52. Philippe BlainMar 29, 2020
  53. 0/5 doc: --recurse-submodulesDamien Robert, Apr 5, 2020
  54. 1/5 doc: list all commands affected by submodule.recurseDamien Robert, Apr 5, 2020
  55. 3/5 doc: explain how to deactivate submodule.recurse completelyDamien Robert, Apr 5, 2020
  56. 2/5 doc: document --recurse-submodules for reset and restoreDamien Robert, Apr 5, 2020
  57. 5/5 doc: --recurse-submodules mostly applies to active submodulesDamien Robert, Apr 5, 2020
  58. 4/5 doc: be more precise on (fetch|push).recurseSubmodulesDamien Robert, Apr 5, 2020
  59. Junio C HamanoApr 5, 2020
  60. Damien RobertApr 6, 2020
  61. Junio C HamanoApr 6, 2020
  62. Damien RobertApr 6, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.