Skip to content

Commit d3a44f6

Browse files
stefanbellergitster
authored andcommitted
Documentation/config: clarify the meaning of submodule.<name>.update
With more commands (that potentially change a submodule) paying attention to submodules as well as the recent discussion[1] on submodule.<name>.update, let's spell out that submodule.<name>.update is strictly to be used for configuring the "submodule update" command and not to be obeyed by other commands. These other commands usually have a strict meaning of what they should do (i.e. checkout, reset, rebase, merge) as well as have their name overlapping with the modes possible for submodule.<name>.update. [1] https://public-inbox.org/git/[email protected]/ submodule.<name>.update was set to "none", triggering unexpected behavior as the submodule was thought to never be touched. However a newer version of Git taught 'git pull --rebase' to also populate and rebase submodules if they were active. The newer options such as submodule.active and command specific flags would not have triggered unexpected behavior. Reported-by: Lars Schneider <[email protected]> Signed-off-by: Stefan Beller <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 59c0ea1 commit d3a44f6

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

Documentation/config.txt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3085,10 +3085,14 @@ submodule.<name>.url::
30853085
See linkgit:git-submodule[1] and linkgit:gitmodules[5] for details.
30863086

30873087
submodule.<name>.update::
3088-
The default update procedure for a submodule. This variable
3089-
is populated by `git submodule init` from the
3090-
linkgit:gitmodules[5] file. See description of 'update'
3091-
command in linkgit:git-submodule[1].
3088+
The method by which a submodule is updated by 'git submodule update',
3089+
which is the only affected command, others such as
3090+
'git checkout --recurse-submodules' are unaffected. It exists for
3091+
historical reasons, when 'git submodule' was the only command to
3092+
interact with submodules; settings like `submodule.active`
3093+
and `pull.rebase` are more specific. It is populated by
3094+
`git submodule init` from the linkgit:gitmodules[5] file.
3095+
See description of 'update' command in linkgit:git-submodule[1].
30923096

30933097
submodule.<name>.branch::
30943098
The remote branch name for a submodule, used by `git submodule

0 commit comments

Comments
 (0)