Re: Submodule using different repository URLs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx:xxx/mymodule.git
> to
> git@xxxxxxxxxx:yyy/foo.git
>
> Using the relative URL ../../yyy/foo.git leads to the result:
> Clone of 'git@xxxxxxxxxx: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@xxxxxxxxxx: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@xxxxxxxxxxx>
www.herland.net
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]