git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix submodule sync with relative submodule URLs
@ 2008-09-22 16:08 Johan Herland
  2008-09-24  7:29 ` David Aguilar
  2008-09-25 11:21 ` [PATCH] git-submodule: remove unnecessary exits when calling resolve_relative_url David Aguilar
  0 siblings, 2 replies; 10+ messages in thread
From: Johan Herland @ 2008-09-22 16:08 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, David Aguilar, Mark Levedahl

Signed-off-by: Johan Herland <johan@herland.net>
---
 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
 		(
-- 
1.6.0.1.400.gd2470

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-09-25 15:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-22 16:08 [PATCH] Fix submodule sync with relative submodule URLs Johan Herland
2008-09-24  7:29 ` David Aguilar
2008-09-24  9:31   ` Johan Herland
2008-09-24 16:19     ` Shawn O. Pearce
2008-09-24 16:41       ` Johan Herland
2008-09-25 11:38       ` David Aguilar
2008-09-25 11:21 ` [PATCH] git-submodule: remove unnecessary exits when calling resolve_relative_url David Aguilar
2008-09-25 12:19   ` Johannes Sixt
2008-09-25 14:54     ` Shawn O. Pearce
2008-09-25 14:58       ` Johan Herland

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).