git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ping Yin" <pkufranky@gmail.com>
To: "Sven Verdoolaege" <skimo@kotnet.org>
Cc: "Git Mailing List" <git@vger.kernel.org>
Subject: Re: [RFC] Configurable name(s) for .gitmodules
Date: Tue, 11 Dec 2007 01:34:02 +0800	[thread overview]
Message-ID: <46dff0320712100934o86af6femaaf563cf40295333@mail.gmail.com> (raw)
In-Reply-To: <20071210165200.GF3490MdfPADPa@greensroom.kotnet.org>

On Dec 11, 2007 12:52 AM, Sven Verdoolaege <skimo@kotnet.org> wrote:
> 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.

> 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

  parent reply	other threads:[~2007-12-10 17:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-07 16:00 [RFC] Configurable name(s) for .gitmodules Ping Yin
2007-12-10 16:20 ` Ping Yin
2007-12-10 16:54 ` Sven Verdoolaege
     [not found] ` <20071210165200.GF3490MdfPADPa@greensroom.kotnet.org>
2007-12-10 17:34   ` Ping Yin [this message]
2007-12-10 17:35     ` Ping Yin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46dff0320712100934o86af6femaaf563cf40295333@mail.gmail.com \
    --to=pkufranky@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=skimo@kotnet.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).