diff mbox series

[v5,4/5] doc: be more precise on (fetch|push).recurseSubmodules

Message ID 20200405201633.704987-5-damien.olivier.robert+git@gmail.com (mailing list archive)
State New, archived
Headers show
Series doc: --recurse-submodules | expand

Commit Message

Damien Robert April 5, 2020, 8:16 p.m. UTC
The default value also depends on the value of submodule.recurse.
Use this opportunity to correct some grammar mistakes in
Documentation/config/fetch.txt signaled by Robert P. J. Day.

Also mention `fetch.recurseSubmodules` in fetch-options.txt. In
git-push.txt, `push.recurseSubmodules` is implicitly mentioned (by
explaining how to disable it), so no need to add it there.

Lastly add a link to `git-fetch` in `git-pull.txt` to explain the
meaning of `--recurse-submodules` there.

Signed-off-by: Damien Robert <damien.olivier.robert+git@gmail.com>
---
 Documentation/config/fetch.txt  | 13 ++++++++-----
 Documentation/config/push.txt   |  2 ++
 Documentation/fetch-options.txt |  3 ++-
 Documentation/git-pull.txt      |  3 +--
 4 files changed, 13 insertions(+), 8 deletions(-)

Comments

Junio C Hamano April 5, 2020, 9:57 p.m. UTC | #1
Damien Robert <damien.olivier.robert@gmail.com> writes:

> The default value also depends on the value of submodule.recurse.
> Use this opportunity to correct some grammar mistakes in
> Documentation/config/fetch.txt signaled by Robert P. J. Day.
>
> Also mention `fetch.recurseSubmodules` in fetch-options.txt. In
> git-push.txt, `push.recurseSubmodules` is implicitly mentioned (by
> explaining how to disable it), so no need to add it there.
>
> Lastly add a link to `git-fetch` in `git-pull.txt` to explain the
> meaning of `--recurse-submodules` there.
>
> Signed-off-by: Damien Robert <damien.olivier.robert+git@gmail.com>
> ---
>  Documentation/config/fetch.txt  | 13 ++++++++-----
>  Documentation/config/push.txt   |  2 ++
>  Documentation/fetch-options.txt |  3 ++-
>  Documentation/git-pull.txt      |  3 +--
>  4 files changed, 13 insertions(+), 8 deletions(-)
>
> diff --git a/Documentation/config/fetch.txt b/Documentation/config/fetch.txt
> index f11940280f..4114af4b3b 100644
> --- a/Documentation/config/fetch.txt
> +++ b/Documentation/config/fetch.txt
> @@ -1,11 +1,14 @@
>  fetch.recurseSubmodules::
> -	This option can be either set to a boolean value or to 'on-demand'.
> +	This option controls whether `git fetch` (and the underlying fetch
> +	in `git pull`) will recursively fetch into populated submodules.
> +	This option can be set either to a boolean value or to 'on-demand'.
>  	Setting it to a boolean changes the behavior of fetch and pull to
> -	unconditionally recurse into submodules when set to true or to not
> -	recurse at all when set to false. When set to 'on-demand' (the default
> -	value), fetch and pull will only recurse into a populated submodule
> -	when its superproject retrieves a commit that updates the submodule's
> +	recurse unconditionally into submodules when set to true or to not
> +	recurse at all when set to false. When set to on-demand, fetch and

Why did you lose quotes around on-demand on this line?  Shouldn't it
be typeset the same way as the other one in the sentence "Defaults
to ..."?

> +	pull will only recurse into a populated submodule when its
> +	superproject retrieves a commit that updates the submodule's
>  	reference.
> +	Defaults to 'on-demand', or to the value of 'submodule.recurse' if set.
Damien Robert April 6, 2020, 1:49 p.m. UTC | #2
From Junio C Hamano, Sun 05 Apr 2020 at 14:57:22 (-0700) :
> Why did you lose quotes around on-demand on this line?  Shouldn't it
> be typeset the same way as the other one in the sentence "Defaults
> to ..."?

Yes it should, sorry it's my mistake, I'll send a new version.
Junio C Hamano April 6, 2020, 5:56 p.m. UTC | #3
Damien Robert <damien.olivier.robert@gmail.com> writes:

> From Junio C Hamano, Sun 05 Apr 2020 at 14:57:22 (-0700) :
>> Why did you lose quotes around on-demand on this line?  Shouldn't it
>> be typeset the same way as the other one in the sentence "Defaults
>> to ..."?
>
> Yes it should, sorry it's my mistake, I'll send a new version.

Thanks.  You may want to wait a bit so that (1) others can spot
similar mistakes, if any, in the version on the list and (2) you
yourself find some similar errors while waiting for others.
Damien Robert April 6, 2020, 6:42 p.m. UTC | #4
From Junio C Hamano, Mon 06 Apr 2020 at 10:56:49 (-0700) :
> Thanks.  You may want to wait a bit so that (1) others can spot
> similar mistakes, if any, in the version on the list and (2) you
> yourself find some similar errors while waiting for others.

Well this was mainly the only change compared to v4 which was sent 10 days
ago. This change was suggested by Philippe Blain, so it has already been
read by him, me, you, and then me again when I sent v6 and checked
carefully I did not miss another quote around 'on-demand'.

Hopefully that will be enough :)
diff mbox series

Patch

diff --git a/Documentation/config/fetch.txt b/Documentation/config/fetch.txt
index f11940280f..4114af4b3b 100644
--- a/Documentation/config/fetch.txt
+++ b/Documentation/config/fetch.txt
@@ -1,11 +1,14 @@ 
 fetch.recurseSubmodules::
-	This option can be either set to a boolean value or to 'on-demand'.
+	This option controls whether `git fetch` (and the underlying fetch
+	in `git pull`) will recursively fetch into populated submodules.
+	This option can be set either to a boolean value or to 'on-demand'.
 	Setting it to a boolean changes the behavior of fetch and pull to
-	unconditionally recurse into submodules when set to true or to not
-	recurse at all when set to false. When set to 'on-demand' (the default
-	value), fetch and pull will only recurse into a populated submodule
-	when its superproject retrieves a commit that updates the submodule's
+	recurse unconditionally into submodules when set to true or to not
+	recurse at all when set to false. When set to on-demand, fetch and
+	pull will only recurse into a populated submodule when its
+	superproject retrieves a commit that updates the submodule's
 	reference.
+	Defaults to 'on-demand', or to the value of 'submodule.recurse' if set.
 
 fetch.fsckObjects::
 	If it is set to true, git-fetch-pack will check all fetched
diff --git a/Documentation/config/push.txt b/Documentation/config/push.txt
index 0a7aa322a9..f5e5b38c68 100644
--- a/Documentation/config/push.txt
+++ b/Documentation/config/push.txt
@@ -112,3 +112,5 @@  push.recurseSubmodules::
 	is 'no' then default behavior of ignoring submodules when pushing
 	is retained. You may override this configuration at time of push by
 	specifying '--recurse-submodules=check|on-demand|no'.
+	If not set, 'no' is used by default, unless 'submodule.recurse' is
+	set (in which case a 'true' value means 'on-demand').
diff --git a/Documentation/fetch-options.txt b/Documentation/fetch-options.txt
index 00d03ec8c3..833f935cd0 100644
--- a/Documentation/fetch-options.txt
+++ b/Documentation/fetch-options.txt
@@ -163,7 +163,8 @@  ifndef::git-pull[]
 	value. Use 'on-demand' to only recurse into a populated submodule
 	when the superproject retrieves a commit that updates the submodule's
 	reference to a commit that isn't already in the local submodule
-	clone.
+	clone. By default, 'on-demand' is used, unless
+	`fetch.recurseSubmodules` is set (see linkgit:git-config[1]).
 endif::git-pull[]
 
 -j::
diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt
index dfb901f8b8..47bc4a7061 100644
--- a/Documentation/git-pull.txt
+++ b/Documentation/git-pull.txt
@@ -86,8 +86,7 @@  OPTIONS
 
 --[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-config[1] and
-	linkgit:gitmodules[5]).
+	be fetched and 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.
 +