OT: question about git submodules (wa: Re: Brief article on benchmarks of Python repository with leading DVCSen)

Stephen J. Turnbull stephen at xemacs.org
Wed Feb 11 10:20:22 GMT 2009

Alexander Belchenko writes:

 > May I ask you about git submodules, the man page is not very clear in 
 > one place. I'm working on bzr plugin that provides emulation of similar 
 > workflow, so I'd like to understand git submodules better.
 > Man page don't say it clear enough: can I use nested submodules?
 > I guess the answer is "yes" I'm just need to be sure.

As far as I know nesting submodules is unsupported.  I haven't tried
it.  It might sort of work.  However, the intent is apparently to
support flat trees of cooperating modules at the same level, not to
allow you to graft in external modules at arbitrary places.

 > What I mean: if I've added repo FOO as submodule with path ./foo, and 
 > then I want to add repo BAR as submodule with path ./foo/bar, should I 
 > add BAR to the root superproject, or I can add it to FOO and therefore 
 > convert FOO submodule to superproject for BAR? What is 
 > recommended/support way here?

The supported way currently is to add BAR to the root project.

I don't see why git's method of representing submodules as commits
would not support arbitrary grafting of external modules.  The problem
is how to manage that, especially structuring the needed metadata, and
I guess they don't have enough porcelain in place yet.



More information about the bazaar mailing list