diff options
author | Johan Herland <johan@herland.net> | 2009-06-03 08:27:06 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-06-03 00:04:52 -0700 |
commit | 329484256e0fe42676e93669122e7a5a007ef4ed (patch) | |
tree | b745d01d1380f2bd9c8c7c88d5c0e59b5f8009e8 /Documentation/git-submodule.txt | |
parent | ca2cedba70e9356a1a20b0e39acd07ab92fee80e (diff) | |
download | git-329484256e0fe42676e93669122e7a5a007ef4ed.tar.gz |
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 <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-submodule.txt')
-rw-r--r-- | Documentation/git-submodule.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt index 0286409744..f993469dc6 100644 --- a/Documentation/git-submodule.txt +++ b/Documentation/git-submodule.txt @@ -114,7 +114,7 @@ update:: Update the registered submodules, i.e. clone missing submodules and checkout the commit specified in the index of the containing repository. This will make the submodules HEAD be detached unless '--rebase' is - specified or the key `submodule.$name.rebase` is set to `true`. + specified or the key `submodule.$name.update` is set to `rebase`. + If the submodule is not yet initialized, and you just want to use the setting as stored in .gitmodules, you can automatically initialize the @@ -184,7 +184,7 @@ OPTIONS superproject. If this option is given, the submodule's HEAD will not be detached. If a a merge failure prevents this process, you will have to resolve these failures with linkgit:git-rebase[1]. - If the key `submodule.$name.rebase` is set to `true`, this option is + If the key `submodule.$name.update` is set to `rebase`, this option is implicit. <path>...:: |