Thread (2 messages) flat view 2 messages, 1 author, 2016-06-15

Re: [RFC] Configurable name(s) for .gitmodules

From: Ping Yin <hidden>
Date: 2016-06-15 22:43:57

On Dec 11, 2007 12:52 AM, Sven Verdoolaege [off-list ref] wrote:
On Sat, Dec 08, 2007 at 12:00:12AM +0800, Ping Yin wrote:
quoted
I have a super project with many submodules. Each kind of role may
check out different set of submodules. There are some common modules
which are almost checked out by every role.

Here comes my question: how to implement this elegantly? If all
submodules are put in the same .gitmodules, every role has to in the
command line manually designate all submodules to be checked out.
You could have submodules (roles in your case) containing
other submodules, as proposed in the thread that ends in
http://thread.gmane.org/gmane.comp.version-control.git/48643/focus=48939

skimo
Thanks for the suggestion. Linus's idea is what i want. As linus said,
one level of indirect will give much more flexibility. It's wonderful
to put something like following to .gitmodules.
	[module "infrastructure"]
		submodule = lib
		submodule = build

	[submodule "lib"]
		url = git://xyzzy/lib-1.2.3

	[submodule "build"]
		url = git://xyzzy/build-0.61

Also I  found Lars's following reply,  i still don't understand quite
well why this idea is not accepted.
The reason I wanted to use

[path "lib"]
  submodule=xyzzylib
  url=git://xyzzy/lib-1.2.3

is that the git-submodule command always starts out with the submodule
path, trying to map that to an url or a submodule name. My proposal
allows

  $ name=$(GIT_CONFIG=.gitmodules git-config path."$path".submodule)
  $ url=$(GIT_CONFIG=.gitmodules git-config path."$path".url)

-- 
Ping Yin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help