aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/gitmodules.txt
diff options
context:
space:
mode:
authorMichal Sojka <sojkam1@fel.cvut.cz>2015-03-02 23:57:58 +0100
committerJunio C Hamano <gitster@pobox.com>2015-03-02 14:59:55 -0800
commit5c31acfbe22cebdf1a04723b58cdb358e377632a (patch)
treec3ddfa53d10dc06a0bccda6a9eae18dc0aa59b21 /Documentation/gitmodules.txt
parent76f8611a5fb7e81c1bada0fb190d573a66fc03f6 (diff)
downloadgit-5c31acfbe22cebdf1a04723b58cdb358e377632a.tar.gz
submodule: improve documentation of update subcommand
The documentation of 'git submodule update' has several problems: 1) It mentions that value 'none' of submodule.$name.update can be overridden by --checkout, but other combinations of configuration values and command line options are not mentioned. 2) The documentation of submodule.$name.update is scattered across three places, which is confusing. 3) The documentation of submodule.$name.update in gitmodules.txt is incorrect, because the code always uses the value from .git/config and never from .gitmodules. 4) Documentation of --force was incomplete, because it is only effective in case of checkout method of update. Fix all these problems by documenting submodule.*.update in git-submodule.txt and make everybody else refer to it. Helped-by: Junio C Hamano <gitster@pobox.com> Helped-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/gitmodules.txt')
-rw-r--r--Documentation/gitmodules.txt21
1 files changed, 9 insertions, 12 deletions
diff --git a/Documentation/gitmodules.txt b/Documentation/gitmodules.txt
index f6c0dfd029..ac70eca321 100644
--- a/Documentation/gitmodules.txt
+++ b/Documentation/gitmodules.txt
@@ -38,18 +38,15 @@ submodule.<name>.url::
In addition, there are a number of optional keys:
submodule.<name>.update::
- Defines what to do when the submodule is updated by the superproject.
- If 'checkout' (the default), the new commit specified in the
- superproject will be checked out in the submodule on a detached HEAD.
- If 'rebase', the current branch of the submodule will be rebased onto
- the commit specified in the superproject. If 'merge', the commit
- specified in the superproject will be merged into the current branch
- in the submodule.
- If 'none', the submodule with name `$name` will not be updated
- by default.
-
- This config option is overridden if 'git submodule update' is given
- the '--merge', '--rebase' or '--checkout' options.
+ Defines the default update procedure for the named submodule,
+ i.e. how the submodule is updated by "git submodule update"
+ command in the superproject. This is only used by `git
+ submodule init` to initialize the configuration variable of
+ the same name. Allowed values here are 'checkout', 'rebase',
+ 'merge' or 'none'. See description of 'update' command in
+ linkgit:git-submodule[1] for their meaning. Note that the
+ '!command' form is intentionally ignored here for security
+ reasons.
submodule.<name>.branch::
A remote branch name for tracking updates in the upstream submodule.