Fix submodule sync with relative submodule URLs
Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Johan Herland committed
Sep 22, 2008 at 18:08 UTC
baede9f803ff7becab815481b004bc983d0422c7
1 file changed
+8
git-submodule.sh
+8
@@ -634,6 +634,14 @@ cmd_sync()
634
do
635
name=$(module_name "$path")
636
url=$(git config -f .gitmodules --get submodule."$name".url)
637
+
638
+ # Possibly a url relative to parent
639
+ case "$url" in
640
+ ./*|../*)
641
+ url=$(resolve_relative_url "$url") || exit
642
+ ;;
643
+ esac
644
+
645
if test -e "$path"/.git
646
then
647
(