Skip to content

Commit 4da9e99

Browse files
Damien Robertgitster
authored andcommitted
doc: be more precise on (fetch|push).recurseSubmodules
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>
1 parent d09bc51 commit 4da9e99

File tree

4 files changed

+13
-8
lines changed

4 files changed

+13
-8
lines changed

Documentation/config/fetch.txt

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
fetch.recurseSubmodules::
2-
This option can be either set to a boolean value or to 'on-demand'.
2+
This option controls whether `git fetch` (and the underlying fetch
3+
in `git pull`) will recursively fetch into populated submodules.
4+
This option can be set either to a boolean value or to 'on-demand'.
35
Setting it to a boolean changes the behavior of fetch and pull to
4-
unconditionally recurse into submodules when set to true or to not
5-
recurse at all when set to false. When set to 'on-demand' (the default
6-
value), fetch and pull will only recurse into a populated submodule
7-
when its superproject retrieves a commit that updates the submodule's
6+
recurse unconditionally into submodules when set to true or to not
7+
recurse at all when set to false. When set to 'on-demand', fetch and
8+
pull will only recurse into a populated submodule when its
9+
superproject retrieves a commit that updates the submodule's
810
reference.
11+
Defaults to 'on-demand', or to the value of 'submodule.recurse' if set.
912

1013
fetch.fsckObjects::
1114
If it is set to true, git-fetch-pack will check all fetched

Documentation/config/push.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,3 +112,5 @@ push.recurseSubmodules::
112112
is 'no' then default behavior of ignoring submodules when pushing
113113
is retained. You may override this configuration at time of push by
114114
specifying '--recurse-submodules=check|on-demand|no'.
115+
If not set, 'no' is used by default, unless 'submodule.recurse' is
116+
set (in which case a 'true' value means 'on-demand').

Documentation/fetch-options.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,8 @@ ifndef::git-pull[]
163163
value. Use 'on-demand' to only recurse into a populated submodule
164164
when the superproject retrieves a commit that updates the submodule's
165165
reference to a commit that isn't already in the local submodule
166-
clone.
166+
clone. By default, 'on-demand' is used, unless
167+
`fetch.recurseSubmodules` is set (see linkgit:git-config[1]).
167168
endif::git-pull[]
168169

169170
-j::

Documentation/git-pull.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@ OPTIONS
8686

8787
--[no-]recurse-submodules[=yes|on-demand|no]::
8888
This option controls if new commits of all populated submodules should
89-
be fetched and updated, too (see linkgit:git-config[1] and
90-
linkgit:gitmodules[5]).
89+
be fetched and updated, too (see linkgit:git-fetch[1], linkgit:git-config[1] and linkgit:gitmodules[5]).
9190
+
9291
If the checkout is done via rebase, local submodule commits are rebased as well.
9392
+

0 commit comments

Comments
 (0)