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

Re: [PATCH v3 5/5] doc: --recurse-submodules mostly only apply to active submodules

From
Philippe Blain <levraiphilippeblain@gmail.com>
Date
Mar 22, 2020, 22:38 UTC
Message-ID
<3689E44D-AB57-448E-99AA-C5317373E825@gmail.com>
In-Reply-To
<20200320213729.571924-6-damien.olivier.robert+git@gmail.com>
> Le 20 mars 2020 à 17:37, Damien Robert <damien.olivier.robert@gmail.com> a écrit

in the title, I'd drop the "only" "mostly only apply" -> "mostly applies"

Show 17 quoted lines
> :
> 
> 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]`
missing a closing '>' here (my mistake).
Show 8 quoted lines
> 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 submodules.
I think you meant  "mostly affects active submodules" here, right?
Show 8 quoted lines
> An exception
> is `git fetch` where the option affects populated submodules.
> As a consequence, in `git pull` the fetch affects populated submodules,
> but the resulting working tree update only affects active submodules.
> 
> In the documentation of `git-pull` we only refer to active submodules,
> since it is implicit that the fetching behaviour is governed by the
> fetch command.

This last paragraph is not a description of the current state of the code base, but describes the changes introduced by this patch. As such, it's customary to write it in the imperative mode. A simple suggestion to fix that:

s/we/let's/
Show 11 quoted lines
> diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt
> index 47bc4a7061..2285f3729d 100644
> --- a/Documentation/git-pull.txt
> +++ b/Documentation/git-pull.txt
> @@ -85,7 +85,7 @@ 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
> +	This option controls if new commits of all active submodules should
> 	be fetched and updated, too (see linkgit:git-fetch[1], linkgit:git-config[1] and linkgit:gitmodules[5]).

I understand that the goal here is to make the formulation not too heavy, as you wrote in https://lore.kernel.org/git/20200320222328.lynvrgqc35pvxxnl@doriath/. However I think the formulation is awkward to begin with : commits are "fetched", but commits are not "updated", the submodules working tree are updated. So maybe:

This option controls if new commits of populated submodules should be fetched, and if the working trees of active submodules should be updated, too

Previous: Damien RobertNext: Damien Robert
Message 43 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.