From 8f0700dd33f63e594b9b34c84efe94e670ea4f45 Mon Sep 17 00:00:00 2001 From: Jens Lehmann Date: Sun, 6 Mar 2011 23:11:21 +0100 Subject: fetch/pull: Add the 'on-demand' value to the --recurse-submodules option Until now the --recurse-submodules option could only be used to either fetch all populated submodules recursively or to disable recursion completely. As fetch and pull now by default just fetch those submodules for which new commits have been fetched in the superproject, a command line option to enforce that behavior is needed to be able to override configuration settings. Signed-off-by: Jens Lehmann Signed-off-by: Junio C Hamano --- Documentation/fetch-options.txt | 16 +++++++++++++--- Documentation/git-pull.txt | 2 +- 2 files changed, 14 insertions(+), 4 deletions(-) (limited to 'Documentation') diff --git a/Documentation/fetch-options.txt b/Documentation/fetch-options.txt index bde62d467..d2870280c 100644 --- a/Documentation/fetch-options.txt +++ b/Documentation/fetch-options.txt @@ -65,9 +65,19 @@ ifndef::git-pull[] specified with the remote..tagopt setting. See linkgit:git-config[1]. ---[no-]recurse-submodules:: - This option controls if new commits of all populated submodules should - be fetched too (see linkgit:git-config[1] and linkgit:gitmodules[5]). +--recurse-submodules[=yes|on-demand|no]:: + This option controls if and under what conditions new commits of + populated submodules should be fetched too. It can be used as a + boolean option to completely disable recursion when set to 'no' or to + unconditionally recurse into all populated submodules when set to + 'yes', which is the default when this option is used without any + value. Use 'on-demand' to only recurse into a populated submodule + when the superproject retrieves a commit that updates the submodule's + reference. + +--no-recurse-submodules:: + Disable recursive fetching of submodules (this has the same effect as + using the '--recurse-submodules=no' option). --submodule-prefix=:: Prepend to paths printed in informative messages diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt index b33e6be87..c45efb37f 100644 --- a/Documentation/git-pull.txt +++ b/Documentation/git-pull.txt @@ -84,7 +84,7 @@ must be given before the options meant for 'git fetch'. --verbose:: Pass --verbose to git-fetch and git-merge. ---[no-]recurse-submodules:: +--[no-]recurse-submodules[=yes|on-demand|no]:: This option controls if new commits of all populated submodules should be fetched too (see linkgit:git-config[1] and linkgit:gitmodules[5]). That might be necessary to get the data needed for merging submodule -- cgit v1.2.1