author | Jens Lehmann <Jens.Lehmann@web.de> | |
Mon, 6 Jun 2011 19:58:04 +0000 (21:58 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 6 Jun 2011 20:46:36 +0000 (13:46 -0700) | ||
commit | 4d689320049e1ff3bd31e0468d6f17eeb0b7029c | |
tree | b3f96609e1df7afbb3640a8384721f39aa4098eb | tree | snapshot |
parent | 8537f0ef936781d3984491603cd1c8ff15d7a8a5 | commit | diff |
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>
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>
Documentation/git-submodule.txt | diff | blob | history | |
git-submodule.sh | diff | blob | history | |
t/t7400-submodule-basic.sh | diff | blob | history |