Skip to content

Commit c838696

Browse files
committed
Merge branch 'bw/submodule-branch-dot-doc' into maint
Recent git allows submodule.<name>.branch to use a special token "." instead of the branch name; the documentation has been updated to describe it. * bw/submodule-branch-dot-doc: submodules doc: update documentation for "." used for submodule branches
2 parents 63cf124 + 15ef780 commit c838696

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

Documentation/git-submodule.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,9 @@ OPTIONS
259259
--branch::
260260
Branch of repository to add as submodule.
261261
The name of the branch is recorded as `submodule.<name>.branch` in
262-
`.gitmodules` for `update --remote`.
262+
`.gitmodules` for `update --remote`. A special value of `.` is used to
263+
indicate that the name of the branch in the submodule should be the
264+
same name as the current branch in the current repository.
263265

264266
-f::
265267
--force::

Documentation/gitmodules.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,11 @@ submodule.<name>.update::
5050

5151
submodule.<name>.branch::
5252
A remote branch name for tracking updates in the upstream submodule.
53-
If the option is not specified, it defaults to 'master'. See the
54-
`--remote` documentation in linkgit:git-submodule[1] for details.
53+
If the option is not specified, it defaults to 'master'. A special
54+
value of `.` is used to indicate that the name of the branch in the
55+
submodule should be the same name as the current branch in the
56+
current repository. See the `--remote` documentation in
57+
linkgit:git-submodule[1] for details.
5558

5659
submodule.<name>.fetchRecurseSubmodules::
5760
This option can be used to control recursive fetching of this

0 commit comments

Comments
 (0)