Wrong url using relative submodule over gitorious-ssh

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

 



Hi,
I tried to use submodules in git. Since I am using gitorious at the moment it 
would be nice to have relative urls to be able to checkout as user and as 
developer. When I am using a checkout over git's native protocol it works fine 
but when I am trying to use ssh it creates a bogus url and nothing changes if 
I am using more ../ before the url.
Lets explain it by example. First thing is that we are assuming that we 
checked out it over git's own protocol (it is emulated by setting the origin 
url in my example)

$ mkdir test1
$ cd test1
$ git init
$ git remote add origin git://gitorious.org/test/mainline.git
$ git submodule init
$ git submodule add ../../test2/mainline.git subdir
 Initialized empty Git repository in ~/test1/subdir/.git/
 remote: Counting objects: 123, done.
 ....

Ok, you will receive a 
 Initialized empty Git repository in ~/test1/subdir/.git/
 fatal: The remote end hung up unexpectedly
 Clone of 'git://gitorious.org/test2/mainline.git' into submodule path 
'subdir' failed
but that is fine because git://gitorious.org/test2/mainline.git is a valid 
gitorious url (if somebody would create test2 as project).

Lets take a look at gitorious urls for ssh push access. They look like 
git@xxxxxxxxxxxxx:test1/mainline.git - similar to the ones used for pull over 
the public git daemon.

$ mkdir test1
$ cd test1
$ git init
$ git remote add origin git@xxxxxxxxxxxxx:test1/mainline.git
$ git submodule init
$ git submodule add ../../test2/mainline.git subdir
 Initialized empty Git repository in ~/test1/subdir/.git/
 Access denied or bad repository path
 fatal: The remote end hung up unexpectedly
 Clone of 'git@xxxxxxxxxxxxx:test1/test2/mainline.git' into submodule path 
'subdir' failed

This is definitely not the url I expected. It is unimportant how many more ../ 
I add but the test1/ will not get away. It is also important that their is no 
/ after : or otherwise the clone will fail too.

This is an important issue for KDE because they want to use (Qt's) gitorious 
and maybe submodules when they want switch to git.

$ git --version                                                                                                                                                 
 git version 1.6.1.1.230.gdfb04
and on my origin/next test
$ git --version                                                                                                                                                 
 git version 1.6.1.1.363.g2a3bd
-- 
Robert Wohlrab
--
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]

  Powered by Linux