Skip to content

Commit

Permalink
git-submodule.txt: Clarify 'init' and 'add' subcommands.
Browse files Browse the repository at this point in the history
Describe how 'add' sets the submodule's logical name, which is used in
the configuration entry names.

Clarify that 'init' only sets up the configuration entries for
submodules that have already been added elsewhere.  Describe that
<path> arguments limit the submodules that are configured.

Signed-off-by: Dale Worley <worley@ariadne.com>
Acked-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Dale R. Worley authored and Junio C Hamano committed May 16, 2013
1 parent 4f4e7e9 commit 3244eb9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Documentation/git-submodule.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ argument <path> is the relative location for the cloned submodule
to exist in the superproject. If <path> is not given, the
"humanish" part of the source repository is used ("repo" for
"/path/to/repo.git" and "foo" for "host.xz:foo/.git").
The <path> is also used as the submodule's logical name in its
configuration entries unless `--name` is used to specify a logical name.
+
<repository> is the URL of the new submodule's origin repository.
This may be either an absolute URL, or (if it begins with ./
Expand Down Expand Up @@ -124,8 +126,10 @@ linkgit:git-status[1] and linkgit:git-diff[1] will provide that information
too (and can also report changes to a submodule's work tree).

init::
Initialize the submodules, i.e. register each submodule name
and url found in .gitmodules into .git/config.
Initialize the submodules recorded in the index (which were
added and committed elsewhere) by copying submodule
names and urls from .gitmodules to .git/config.
Optional <path> arguments limit which submodules will be initialized.
It will also copy the value of `submodule.$name.update` into
.git/config.
The key used in .git/config is `submodule.$name.url`.
Expand Down

0 comments on commit 3244eb9

Please sign in to comment.