Thread (10 messages) flat view 10 messages, 4 authors, 2016-06-15
DORMANTno replies

[PATCH] Fix submodule sync with relative submodule URLs

From: Johan Herland <hidden>
Date: 2016-06-15 22:45:24
Subsystem: the rest · Maintainer: Linus Torvalds

Signed-off-by: Johan Herland <redacted>
---

On Wednesday 24 September 2008, David Aguilar wrote:
Instead of just doing an "|| exit" shouldn't it report an explanation
of the error?
Other than that, it looks good to me.
Fixed. Thanks.

...Johan


 git-submodule.sh |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/git-submodule.sh b/git-submodule.sh
index 1c39b59..f89bdbe 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -634,6 +634,15 @@ 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") ||
+				die "failed to resolve relative submodule url for '$name'"
+			;;
+		esac
+
 		if test -e "$path"/.git
 		then
 		(
-- 
1.6.0.2.463.g7f0eb
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help