summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-04-04 22:02:01 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-04-04 22:02:01 (GMT)
commit2071fb015bc673d2514142d7614b56a37b3faaf2 (patch)
tree8bd133ee781324212c8ebc395178d20707082ae2 /Documentation
parent2c320e71bfae3d2972d41680a04b78cbd42cb941 (diff)
parent794a3592ad9d8a9b273f6496052bbcb46b1924ed (diff)
downloadgit-2071fb015bc673d2514142d7614b56a37b3faaf2.zip
git-2071fb015bc673d2514142d7614b56a37b3faaf2.tar.gz
git-2071fb015bc673d2514142d7614b56a37b3faaf2.tar.bz2
Merge branch 'jl/submodule-fetch-on-demand'
* jl/submodule-fetch-on-demand: fetch/pull: Describe --recurse-submodule restrictions in the BUGS section submodule update: Don't fetch when the submodule commit is already present fetch/pull: Don't recurse into a submodule when commits are already present Submodules: Add 'on-demand' value for the 'fetchRecurseSubmodule' option config: teach the fetch.recurseSubmodules option the 'on-demand' value fetch/pull: Add the 'on-demand' value to the --recurse-submodules option fetch/pull: recurse into submodules when necessary Conflicts: builtin/fetch.c submodule.c
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/config.txt12
-rw-r--r--Documentation/fetch-options.txt25
-rw-r--r--Documentation/git-fetch.txt9
-rw-r--r--Documentation/git-pull.txt11
-rw-r--r--Documentation/gitmodules.txt4
5 files changed, 51 insertions, 10 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 1d0d1b7..6d4dfa6 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -897,9 +897,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), fetch and pull will only recurse into a populated submodule
+ when its superproject retrieves a commit that updates the submodule's
+ reference.
fetch.unpackLimit::
If the number of objects fetched over the git native
@@ -1823,7 +1827,7 @@ submodule.<name>.update::
linkgit:git-submodule[1] and linkgit:gitmodules[5] for details.
submodule.<name>.fetchRecurseSubmodules::
- This option can be used to enable/disable recursive fetching of this
+ This option can be used to control recursive fetching of this
submodule. It can be overridden by using the --[no-]recurse-submodules
command line option to "git fetch" and "git pull".
This setting will override that from in the linkgit:gitmodules[5]
diff --git a/Documentation/fetch-options.txt b/Documentation/fetch-options.txt
index f37276e..39d326a 100644
--- a/Documentation/fetch-options.txt
+++ b/Documentation/fetch-options.txt
@@ -65,14 +65,33 @@ ifndef::git-pull[]
specified with the remote.<name>.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 to a commit that isn't already in the local submodule
+ clone.
+
+--no-recurse-submodules::
+ Disable recursive fetching of submodules (this has the same effect as
+ using the '--recurse-submodules=no' option).
--submodule-prefix=<path>::
Prepend <path> to paths printed in informative messages
such as "Fetching submodule foo". This option is used
internally when recursing over submodules.
+
+--recurse-submodules-default=[yes|on-demand]::
+ This option is used internally to temporarily provide a
+ non-negative default value for the --recurse-submodules
+ option. All other methods of configuring fetch's submodule
+ recursion (such as settings in linkgit:gitmodules[5] and
+ linkgit:git-config[1]) override this option, as does
+ specifying --[no-]recurse-submodules directly.
endif::git-pull[]
-u::
diff --git a/Documentation/git-fetch.txt b/Documentation/git-fetch.txt
index 7146f6b..67d2214 100644
--- a/Documentation/git-fetch.txt
+++ b/Documentation/git-fetch.txt
@@ -76,6 +76,15 @@ The `pu` branch will be updated even if it is does not fast-forward,
because it is prefixed with a plus sign; `tmp` will not be.
+BUGS
+----
+Using --recurse-submodules can only fetch new commits in already checked
+out submodules right now. When e.g. upstream added a new submodule in the
+just fetched commits of the superproject the submodule itself can not be
+fetched, making it impossible to check out that submodule later without
+having to do a fetch again. This is expected to be fixed in a future git
+version.
+
SEE ALSO
--------
linkgit:git-pull[1]
diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt
index c2a7f10..14609cb 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
@@ -220,6 +220,15 @@ If you tried a pull which resulted in a complex conflicts and
would want to start over, you can recover with 'git reset'.
+BUGS
+----
+Using --recurse-submodules can only fetch new commits in already checked
+out submodules right now. When e.g. upstream added a new submodule in the
+just fetched commits of the superproject the submodule itself can not be
+fetched, making it impossible to check out that submodule later without
+having to do a fetch again. This is expected to be fixed in a future git
+version.
+
SEE ALSO
--------
linkgit:git-fetch[1], linkgit:git-merge[1], linkgit:git-config[1]
diff --git a/Documentation/gitmodules.txt b/Documentation/gitmodules.txt
index 15a2186..4040941 100644
--- a/Documentation/gitmodules.txt
+++ b/Documentation/gitmodules.txt
@@ -45,12 +45,12 @@ submodule.<name>.update::
the '--merge' or '--rebase' options.
submodule.<name>.fetchRecurseSubmodules::
- This option can be used to enable/disable recursive fetching of this
+ This option can be used to control recursive fetching of this
submodule. If this option is also present in the submodules entry in
.git/config of the superproject, the setting there will override the
one found in .gitmodules.
Both settings can be overridden on the command line by using the
- "--[no-]recurse-submodules" option to "git fetch" and "git pull"..
+ "--[no-]recurse-submodules" option to "git fetch" and "git pull".
submodule.<name>.ignore::
Defines under what circumstances "git status" and the diff family show