Fix submodule sync with relative submodule URLs

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
maint
Johan Herland 2008-09-22 18:08:31 +02:00 committed by Shawn O. Pearce
parent 064bfbde45
commit baede9f803
1 changed files with 8 additions and 0 deletions

View File

@ -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
(