Skip to content

Commit 9e6ed47

Browse files
jlehmanngitster
authored andcommitted
docs: describe behavior of relative submodule URLs
Since the relative submodule URLs have been introduced in f31a522, they do not conform to the rules for resolving relative URIs but rather to those of relative directories. Document that behavior. Signed-off-by: Jens Lehmann <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 66c11f0 commit 9e6ed47

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Documentation/git-submodule.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,12 @@ to exist in the superproject. If <path> is not given, the
7979
<repository> is the URL of the new submodule's origin repository.
8080
This may be either an absolute URL, or (if it begins with ./
8181
or ../), the location relative to the superproject's origin
82-
repository. If the superproject doesn't have an origin configured
82+
repository (Please note that to specify a repository 'foo.git'
83+
which is located right next to a superproject 'bar.git', you'll
84+
have to use '../foo.git' instead of './foo.git' - as one might expect
85+
when following the rules for relative URLs - because the evaluation
86+
of relative URLs in Git is identical to that of relative directories).
87+
If the superproject doesn't have an origin configured
8388
the superproject is its own authoritative upstream and the current
8489
working directory is used instead.
8590
+

0 commit comments

Comments
 (0)