Skip to content

Commit baede9f

Browse files
jherlandspearce
authored andcommitted
Fix submodule sync with relative submodule URLs
Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
1 parent 064bfbd commit baede9f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

git-submodule.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,14 @@ cmd_sync()
634634
do
635635
name=$(module_name "$path")
636636
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+
637645
if test -e "$path"/.git
638646
then
639647
(

0 commit comments

Comments
 (0)