git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Herland <johan@herland.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, David Aguilar <davvid@gmail.com>,
	Mark Levedahl <mdl123@verizon.net>
Subject: [PATCH] Fix submodule sync with relative submodule URLs
Date: Mon, 22 Sep 2008 18:08:31 +0200	[thread overview]
Message-ID: <200809221808.31730.johan@herland.net> (raw)

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

             reply	other threads:[~2008-09-22 16:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-22 16:08 Johan Herland [this message]
2008-09-24  7:29 ` [PATCH] Fix submodule sync with relative submodule URLs 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200809221808.31730.johan@herland.net \
    --to=johan@herland.net \
    --cc=davvid@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=mdl123@verizon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).