]> git.ipfire.org Git - thirdparty/git.git/commitdiff
doc: be more precise on (fetch|push).recurseSubmodules
authorDamien Robert <damien.olivier.robert@gmail.com>
Mon, 6 Apr 2020 13:57:08 +0000 (15:57 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 6 Apr 2020 20:42:43 +0000 (13:42 -0700)
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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/config/fetch.txt
Documentation/config/push.txt
Documentation/fetch-options.txt
Documentation/git-pull.txt

index f11940280fe303d53794b1f6de50c63e3a2829be..b1a9b1461d30f4e79bd194d968cebbb8617b3181 100644 (file)
@@ -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
index 0a7aa322a9be695cd9863a519bf3fae5b789a7df..f5e5b38c6889e92d5366e7be1140db57e8f708c4 100644 (file)
@@ -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').
index 00d03ec8c31ab2fd05d58248c5d811167309d780..833f935cd012ae14518273dcb6590c8f38b4b4f9 100644 (file)
@@ -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::
index dfb901f8b8358ea309e6403079e3c87fb82fee6f..47bc4a7061dec0c11cd95a3215dc790dc4dadda7 100644 (file)
@@ -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.
 +