Re: [RFC] Configurable name(s) for .gitmodules
- From
Ping Yin <pkufranky@gmail.com>
- Date
- Dec 10, 2007, 17:34 UTC
- Message-ID
- <46dff0320712100934o86af6femaaf563cf40295333@mail.gmail.com>
- In-Reply-To
- <20071210165200.GF3490MdfPADPa@greensroom.kotnet.org>
On Dec 11, 2007 12:52 AM, Sven Verdoolaege <skimo@kotnet.org> wrote:
Show 15 quoted lines
> On Sat, Dec 08, 2007 at 12:00:12AM +0800, Ping Yin wrote: > > 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.
Show 13 quoted lines
> 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