summaryrefslogtreecommitdiff
path: root/Documentation/git-submodule.txt
diff options
context:
space:
mode:
authorJens Lehmann <Jens.Lehmann@web.de>2009-09-22 17:10:12 +0200
committerJunio C Hamano <gitster@pobox.com>2009-09-22 12:24:49 -0700
commit1414e5788b85787a712a30977b388200f1bc04da (patch)
tree883d7027fceed475781430ff2d57957d648ab136 /Documentation/git-submodule.txt
parenta16753dc2e6f885fd30e570610c3e8cf355ecf04 (diff)
downloadgit-1414e5788b85787a712a30977b388200f1bc04da.tar.gz
git submodule add: make the <path> parameter optional
When <path> is not given, use the "humanish" part of the source repository instead. Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-submodule.txt')
-rw-r--r--Documentation/git-submodule.txt8
1 files changed, 6 insertions, 2 deletions
diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt
index 5ccdd18c89..4ef70c42eb 100644
--- a/Documentation/git-submodule.txt
+++ b/Documentation/git-submodule.txt
@@ -10,7 +10,7 @@ SYNOPSIS
--------
[verse]
'git submodule' [--quiet] add [-b branch]
- [--reference <repository>] [--] <repository> <path>
+ [--reference <repository>] [--] <repository> [<path>]
'git submodule' [--quiet] status [--cached] [--recursive] [--] [<path>...]
'git submodule' [--quiet] init [--] [<path>...]
'git submodule' [--quiet] update [--init] [-N|--no-fetch] [--rebase]
@@ -69,7 +69,11 @@ add::
to the changeset to be committed next to the current
project: the current project is termed the "superproject".
+
-This requires two arguments: <repository> and <path>.
+This requires at least one argument: <repository>. The optional
+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").
+
<repository> is the URL of the new submodule's origin repository.
This may be either an absolute URL, or (if it begins with ./