path: root/Documentation/gitmodules.txt
diff options
authorJohan Herland <>2009-06-03 06:27:06 (GMT)
committerJunio C Hamano <>2009-06-03 07:04:52 (GMT)
commit329484256e0fe42676e93669122e7a5a007ef4ed (patch)
treeb745d01d1380f2bd9c8c7c88d5c0e59b5f8009e8 /Documentation/gitmodules.txt
parentca2cedba70e9356a1a20b0e39acd07ab92fee80e (diff)
Rename submodule.<name>.rebase to submodule.<name>.update
The addition of "submodule.<name>.rebase" demonstrates the usefulness of alternatives to the default behaviour of "git submodule update". However, by naming the config variable "submodule.<name>.rebase", and making it a boolean choice, we are artificially constraining future git versions that may want to add _more_ alternatives than just "rebase". Therefore, while "submodule.<name>.rebase" is not yet in a stable git release, future-proof it, by changing it from submodule.<name>.rebase = true/false to submodule.<name>.update = rebase/checkout where "checkout" specifies the default behaviour of "git submodule update" (checking out the new commit to a detached HEAD), and "rebase" specifies the --rebase behaviour (where the current local branch in the submodule is rebase onto the new commit). Thus .update == checkout is equivalent to .rebase == false, and .update == rebase is equivalent to .rebase == true. Finally, leaving .update unset is equivalent to leaving .rebase unset. In future git versions, other alternatives to "git submodule update" behaviour can be included by adding them to the list of allowable values for the submodule.<name>.update variable. Signed-off-by: Johan Herland <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'Documentation/gitmodules.txt')
1 files changed, 8 insertions, 2 deletions
diff --git a/Documentation/gitmodules.txt b/Documentation/gitmodules.txt
index 7c22c40..1b67f0a 100644
--- a/Documentation/gitmodules.txt
+++ b/Documentation/gitmodules.txt
@@ -30,8 +30,14 @@ submodule.<name>.path::
Defines an url from where the submodule repository can be cloned.
- Defines that the submodule should be rebased by default.
+ 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.
+ This config option is overridden if 'git submodule update' is given
+ the '--rebase' option.