git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Sven VerdoolaegeNext: Ping Yin
Message 4 of 5 in “[RFC] Configurable name(s) for .gitmodules”
  1. Ping YinDec 7, 2007
  2. Ping YinDec 10, 2007
  3. Sven VerdoolaegeDec 10, 2007
  4. Ping YinDec 10, 2007
  5. Ping YinDec 10, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.