Git development
 help / color / mirror / Atom feed
From: Robert Wohlrab <robert.wohlrab@gmx.de>
To: git@vger.kernel.org
Subject: Wrong url using relative submodule over gitorious-ssh
Date: Tue, 27 Jan 2009 14:37:43 +0100	[thread overview]
Message-ID: <200901271437.43737.robert.wohlrab@gmx.de> (raw)

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@gitorious.org: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@gitorious.org: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@gitorious.org: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

                 reply	other threads:[~2009-01-27 13:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=200901271437.43737.robert.wohlrab@gmx.de \
    --to=robert.wohlrab@gmx.de \
    --cc=git@vger.kernel.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