Re: Nesting a submodule inside of another...
- From
Andreas Ericsson <ae@op5.se>
- Date
- Jul 13, 2011, 08:43 UTC
- Message-ID
- <4E1D5AC3.5050409@op5.se>
- In-Reply-To
- <CAEBDL5XQDehUyqKoazxy+YVHh_2iAyt9aE-77H1jZg4oujMJgw@mail.gmail.com>
On 07/12/2011 02:01 PM, John Szakmeister wrote:
Show 15 quoted lines
> Hi all, > > I've got a project where we have several frameworks involved, and > external modules we want to pull into the framework tree. We'd like > to make use of submodules and have something like this: > top-level/<-- .gitmodules lives here > src/ > framework1/<-- a submodule > module/<-- another submodule > framework2/<-- a submodule > module2/<-- another submodule > > Currently, git fails trying to do this. It's not happy about > .gitmodules living at the top-level and nesting a submodule inside of > another[1]. Is there a technical reason that this is not allowed?
Yes. Everything inside a submodule is owned by that submodule, so the master repo can't know anything about it. You can have a submodule which in turn has submodules though. If you couldn't, it wouldn't be possible to checkout only the framework1 repository and get all its dependencies.
I have no idea what problems you run into with more than 2 tiers of submodules though, but I guess that's for you to find out and report about.
-- Andreas Ericsson andreas.ericsson@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 Considering the successes of the wars on alcohol, poverty, drugs and terror, I think we should give some serious thought to declaring war on peace.