From: "Jānis Rukšāns" <janis.ruksans@gmail.com>
To: "Cox, Michael" <mhcox@bluezoosoftware.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: Submodule, subtree, or something else?
Date: Mon, 24 Aug 2015 20:12:38 +0300 [thread overview]
Message-ID: <1440436358.32140.72.camel@gmail.com> (raw)
In-Reply-To: <CAK6hiNiBD+DUdNq0c2DY9LWg2PCgE56SpbBip8BNNmHTsEttuQ@mail.gmail.com>
On Sv, 2015-08-23 at 17:13 -0600, Cox, Michael wrote:
> You might want to take a look at how the Boost (boost.org) project
> uses submodules. They use submodules for each library. I know they
> use relative paths in their .gitmodules file to avoid the problem
> you're referring to regarding "git clone --recurse-submodules".
Thanks! I had a look at their setup, and they are using ../libx.git for
submodules, which unfortunately breaks when cloning from another
"working copy":
$ git clone --recursive file:///tmp/gittest/repo.a/main.git main.work
Cloning into 'main.work'...
<snip>
Submodule 'liba' (file:///tmp/gittest/repo.a/liba.git) registered for path 'liba'
Cloning into 'liba'...
<snip>
Submodule path 'liba': checked out '6a0ef37c03a7068328956dcb8a08bc39f280edfc'
$ git clone --recursive file://($pwd)/main.work main.home
Cloning into 'main.home'...
<snip>
Submodule 'liba' (file:///tmp/gittest/work/liba.git) registered for path 'liba'
Cloning into 'liba'...
fatal: '/tmp/gittest/work/liba.git' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Clone of 'file:///tmp/gittest/work/liba.git' into submodule path 'liba' failed
After some trial and error I managed to get what I wanted to achieve by
using ./liba as the submodule URL (no .git suffix!), and creating a file
named liba in /tmp/gittest/repo.a/main.git (ie. the bare "origin" repo)
with a single line in it:
gitdir: ../liba.git
However, I'm not sure it is the right thing, or even advisable to do so.
prev parent reply other threads:[~2015-08-24 17:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-21 22:47 Submodule, subtree, or something else? Jānis Rukšāns
2015-08-22 0:07 ` Stefan Beller
2015-08-23 14:11 ` Jānis Rukšāns
2015-08-24 16:51 ` Stefan Beller
2015-08-24 17:53 ` Jānis Rukšāns
[not found] ` <CAK6hiNiBD+DUdNq0c2DY9LWg2PCgE56SpbBip8BNNmHTsEttuQ@mail.gmail.com>
2015-08-24 17:12 ` Jānis Rukšāns [this message]
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=1440436358.32140.72.camel@gmail.com \
--to=janis.ruksans@gmail.com \
--cc=git@vger.kernel.org \
--cc=mhcox@bluezoosoftware.com \
/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;
as well as URLs for NNTP newsgroup(s).