From: Marc Branchaud Date: Wed, 02 Mar 2011 16:02:11 GMT Subject: Re: [PATCH v3 3/7] config: teach the fetch.recurseSubmodules option the 'on-demand' value Message-ID: <4D6E6A03.2090902@xiplink.com> In-Reply-To: <4D6D7B00.1020807@web.de> On 11-03-01 06:02 PM, Jens Lehmann wrote: > To enable the user to change the default behavior of "git fetch" and "git > pull" regarding submodule recursion add the new "on-demand" value which > has just been added to the "--recurse-submodules" command line option. > > Signed-off-by: Jens Lehmann > --- > Documentation/config.txt | 10 +++++++--- > submodule.c | 2 +- > t/t5526-fetch-submodules.sh | 28 ++++++++++++++++++++++++++++ > 3 files changed, 36 insertions(+), 4 deletions(-) > > diff --git a/Documentation/config.txt b/Documentation/config.txt > index 96ce272..7b06fe5 100644 > --- a/Documentation/config.txt > +++ b/Documentation/config.txt > @@ -900,9 +900,13 @@ diff.wordRegex:: > characters are *ignorable* whitespace. > > fetch.recurseSubmodules:: > - A boolean value which changes the behavior for fetch and pull, the > - default is to not recursively fetch populated submodules unless > - configured otherwise. > + This option can be either set 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), it tells fetch and pull to recurse only into those submodules > + where new commits are recorded in the commmits fetched for the > + superproject. Nit: Replace the last sentence with 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 reference. M.