{"thread":{"id":"17391","subject":"Wrong url using relative submodule over gitorious-ssh","startedAt":"2009-01-27T13:37:43Z","lastAt":"2009-01-27T13:37:43Z","messageCount":1,"participants":["Robert Wohlrab"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"102118","messageId":"200901271437.43737.robert.wohlrab@gmx.de","threadId":"17391","inReplyTo":null,"subject":"Wrong url using relative submodule over gitorious-ssh","fromName":"Robert Wohlrab","fromEmail":"robert.wohlrab@gmx.de","sentAt":"2009-01-27T13:37:43Z","receivedAt":"2009-01-27T13:37:43Z","isPatch":false,"sender":{"key":"robert.wohlrab@gmx.de","avatar":null},"body":"Hi,\nI tried to use submodules in git. Since I am using gitorious at the moment it \nwould be nice to have relative urls to be able to checkout as user and as \ndeveloper. When I am using a checkout over git's native protocol it works fine \nbut when I am trying to use ssh it creates a bogus url and nothing changes if \nI am using more ../ before the url.\nLets explain it by example. First thing is that we are assuming that we \nchecked out it over git's own protocol (it is emulated by setting the origin \nurl in my example)\n\n$ mkdir test1\n$ cd test1\n$ git init\n$ git remote add origin git://gitorious.org/test/mainline.git\n$ git submodule init\n$ git submodule add ../../test2/mainline.git subdir\n Initialized empty Git repository in ~/test1/subdir/.git/\n remote: Counting objects: 123, done.\n ....\n\nOk, you will receive a \n Initialized empty Git repository in ~/test1/subdir/.git/\n fatal: The remote end hung up unexpectedly\n Clone of 'git://gitorious.org/test2/mainline.git' into submodule path \n'subdir' failed\nbut that is fine because git://gitorious.org/test2/mainline.git is a valid \ngitorious url (if somebody would create test2 as project).\n\nLets take a look at gitorious urls for ssh push access. They look like \ngit@gitorious.org:test1/mainline.git - similar to the ones used for pull over \nthe public git daemon.\n\n$ mkdir test1\n$ cd test1\n$ git init\n$ git remote add origin git@gitorious.org:test1/mainline.git\n$ git submodule init\n$ git submodule add ../../test2/mainline.git subdir\n Initialized empty Git repository in ~/test1/subdir/.git/\n Access denied or bad repository path\n fatal: The remote end hung up unexpectedly\n Clone of 'git@gitorious.org:test1/test2/mainline.git' into submodule path \n'subdir' failed\n\nThis is definitely not the url I expected. It is unimportant how many more ../ \nI add but the test1/ will not get away. It is also important that their is no \n/ after : or otherwise the clone will fail too.\n\nThis is an important issue for KDE because they want to use (Qt's) gitorious \nand maybe submodules when they want switch to git.\n\n$ git --version                                                                                                                                                 \n git version 1.6.1.1.230.gdfb04\nand on my origin/next test\n$ git --version                                                                                                                                                 \n git version 1.6.1.1.363.g2a3bd\n-- \nRobert Wohlrab\n"}]}