From: Johan Herland <johan@herland.net>
To: Peter Voss <info@petervoss.org>
Cc: git@vger.kernel.org
Subject: Re: Submodule using different repository URLs
Date: Mon, 13 Jul 2009 14:28:43 +0200 [thread overview]
Message-ID: <200907131428.43652.johan@herland.net> (raw)
In-Reply-To: <64652870-CF95-49A7-920A-0F9A6C202B40@petervoss.org>
On Monday 13 July 2009, Peter Voss wrote:
> On 13.07.2009, at 12:59, Johan Herland wrote:
> > You might be able to pull this off using relative submodule URLs.
>
> That's a good hint. Unfortunately I can't use this to go up 2
> directories. I.e. I can't get from
> git@github.com:xxx/mymodule.git
> to
> git@github.com:yyy/foo.git
>
> Using the relative URL ../../yyy/foo.git leads to the result:
> Clone of 'git@github.com:xxx/yyy/foo.git' into submodule path 'foo'
> failed
>
> So I basically cannot replace the xxx part.
This is due to a small bug in git-submodule.sh. In the
resolve_relative_url() function, when repeatedly unwrapping '../'s from
$url in the while loop, the line remoteurl="${remoteurl%/*}" removes
everything _after_ the last slash, which does not work for the
git@github.com:xxx part of your URL.
This should be relatively easy to fix, although maybe not as
straightforwardly trivial as it might seem at first sight.
I don't have the time to look into this now, so feel free to take a stab
at it.
Have fun! :)
...Johan
--
Johan Herland, <johan@herland.net>
www.herland.net
next prev parent reply other threads:[~2009-07-13 12:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-13 9:57 Submodule using different repository URLs Peter Voss
2009-07-13 10:20 ` Santi Béjar
2009-07-13 12:04 ` Peter Voss
2009-07-13 10:59 ` Johan Herland
2009-07-13 11:51 ` Peter Voss
2009-07-13 12:28 ` Johan Herland [this message]
2009-07-13 12:43 ` Johan Herland
2009-07-13 13:33 ` Peter Voss
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=200907131428.43652.johan@herland.net \
--to=johan@herland.net \
--cc=git@vger.kernel.org \
--cc=info@petervoss.org \
/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