]> git.ipfire.org Git - thirdparty/git.git/commitdiff
submodules doc: update documentation for "." used for submodule branches
authorBrandon Williams <bmwill@google.com>
Wed, 19 Oct 2016 20:42:54 +0000 (13:42 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 19 Oct 2016 21:58:53 +0000 (14:58 -0700)
4d7bc52b17 ("submodule update: allow '.' for branch value",
2016-08-03) adopted from Gerrit a feature to set "." as a special
value of "submodule.<name>.branch" in .gitmodules file to indicate
that the tracking branch in the submodule should be the same as the
current branch in the superproject.

Update the documentation to describe this.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-submodule.txt
Documentation/gitmodules.txt

index bf3bb372ee51397b362266d275cd557781585861..d8415734753e0d03f3f6d37bd4b76369d37f5fb0 100644 (file)
@@ -259,7 +259,9 @@ OPTIONS
 --branch::
        Branch of repository to add as submodule.
        The name of the branch is recorded as `submodule.<name>.branch` in
-       `.gitmodules` for `update --remote`.
+       `.gitmodules` for `update --remote`.  A special value of `.` is used to
+       indicate that the name of the branch in the submodule should be the
+       same name as the current branch in the current repository.
 
 -f::
 --force::
index 07cdd73ab2e68da4aaef30a523801f56610b176c..5f50df4079a80d70086bf4a1bf2c6974f4ed5689 100644 (file)
@@ -50,8 +50,11 @@ submodule.<name>.update::
 
 submodule.<name>.branch::
        A remote branch name for tracking updates in the upstream submodule.
-       If the option is not specified, it defaults to 'master'.  See the
-       `--remote` documentation in linkgit:git-submodule[1] for details.
+       If the option is not specified, it defaults to 'master'.  A special
+       value of `.` is used to indicate that the name of the branch in the
+       submodule should be the same name as the current branch in the
+       current repository.  See the `--remote` documentation in
+       linkgit:git-submodule[1] for details.
 
 submodule.<name>.fetchRecurseSubmodules::
        This option can be used to control recursive fetching of this