summaryrefslogtreecommitdiff
path: root/Documentation/git-submodule.txt
diff options
context:
space:
mode:
authorJens Lehmann <Jens.Lehmann@web.de>2011-06-06 21:58:04 +0200
committerJunio C Hamano <gitster@pobox.com>2011-06-06 13:46:36 -0700
commit4d689320049e1ff3bd31e0468d6f17eeb0b7029c (patch)
treeb3f96609e1df7afbb3640a8384721f39aa4098eb /Documentation/git-submodule.txt
parent8537f0ef936781d3984491603cd1c8ff15d7a8a5 (diff)
downloadgit-4d689320049e1ff3bd31e0468d6f17eeb0b7029c.tar.gz
submodule add: allow relative repository path even when no url is set
Adding a submodule with a relative repository path did only succeed when the superproject's default remote was set. But when that is unset, the superproject is its own authoritative upstream, so lets use its working directory as upstream instead. This allows users to set up a new superpoject where the submodules urls are configured relative to the superproject's upstream while its default remote can be configured later. 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.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt
index 1a16ff6044..f72e900d23 100644
--- a/Documentation/git-submodule.txt
+++ b/Documentation/git-submodule.txt
@@ -78,7 +78,9 @@ to exist in the superproject. If <path> is not given, the
<repository> is the URL of the new submodule's origin repository.
This may be either an absolute URL, or (if it begins with ./
or ../), the location relative to the superproject's origin
-repository.
+repository. If the superproject doesn't have an origin configured
+the superproject is its own authoritative upstream and the current
+working directory is used instead.
+
<path> is the relative location for the cloned submodule to
exist in the superproject. If <path> does not exist, then the