diff options
author | Johan Herland <johan@herland.net> | 2008-09-22 16:08:31 (GMT) |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2008-09-25 15:11:03 (GMT) |
commit | baede9f803ff7becab815481b004bc983d0422c7 (patch) | |
tree | 5def2f73a7cc865dae9ea2e7e28c13c1d48a1a5a | |
parent | 064bfbde45e5ad70a5f8a2290ff3fbed0b69f326 (diff) | |
download | git-baede9f803ff7becab815481b004bc983d0422c7.zip git-baede9f803ff7becab815481b004bc983d0422c7.tar.gz git-baede9f803ff7becab815481b004bc983d0422c7.tar.bz2 |
Fix submodule sync with relative submodule URLs
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
-rwxr-xr-x | git-submodule.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/git-submodule.sh b/git-submodule.sh index 1c39b59..92be0fe 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -634,6 +634,14 @@ cmd_sync() do name=$(module_name "$path") url=$(git config -f .gitmodules --get submodule."$name".url) + + # Possibly a url relative to parent + case "$url" in + ./*|../*) + url=$(resolve_relative_url "$url") || exit + ;; + esac + if test -e "$path"/.git then ( |