From: Sven Verdoolaege <skimo@kotnet.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Lars Hjemli <hjemli@gmail.com>, Junio C Hamano <junkio@cox.net>,
git@vger.kernel.org
Subject: Re: [PATCH] Let .git/config specify the url for submodules
Date: Sat, 02 Jun 2007 19:35:51 +0200 [thread overview]
Message-ID: <20070602173551.GC955MdfPADPa@greensroom.kotnet.org> (raw)
In-Reply-To: <alpine.LFD.0.98.0706020923170.23741@woody.linux-foundation.org>
On Sat, Jun 02, 2007 at 09:34:26AM -0700, Linus Torvalds wrote:
> On Sat, 2 Jun 2007, Sven Verdoolaege wrote:
> > On Fri, Jun 01, 2007 at 09:29:58AM -0700, Linus Torvalds wrote:
> > > [module "infrastructure"]
> > > submodule = lib
> > > submodule = build
> > >
> > > [submodule "lib"]
> > > url = git://xyzzy/lib-1.2.3
> > >
> > > [submodule "build"]
> > > url = git://xyzzy/build-0.61
> > >
> > >
> > > IOW, in the above case, we have *three* modules:
> > >
> > > - module "infrastructure", that is the union of submodules/paths "lib"
> > > and "build"
> > > - module "lib" (== submodule/path "lib")
> > > - module "build" (== submodule/path "build")
> >
> > If there are three modules, then why is one in the "module" section
> > and the other two in the "submodule" section?
>
> Because there are:
>
> - *two* actual submodules (== path), namely "lib" and "build".
>
> - each submodule always is *implicitly* a module too
>
> - we have a *named* (aka explicit) module "infrastructure" that is a
> higher-level name for one or more submodules (in this case two).
>
> So the implicit modules could have been written out:
>
> [module "lib"]
> submodule = "lib" # aka 'path = "lib"'
>
> [module "build"]
> submodule = "build" # aka 'path = "build"'
>
> but my suggestion was that if the module name and the path name are the
> same, you don't need to say it.
>
> (And quite frankly, I think it reads better as "submodule" than as "path",
> but maybe that threw you).
I did indeed glance over the "submodule == path" in your mail (and it
seems Junio did so too).
I thought it was more or less agreed that the URL should be associated
to the logical module rather than the path (which you call "submodule"
here). See http://article.gmane.org/gmane.comp.version-control.git/47567 .
Personally, I find your section names confusing.
Both your "submodule"s and "module"s are submodules from the point
of view of the project containing the .gitmodules.
And anything in the "submodule" section is only a (proper) submodule
of some other module if there happens to be a "module" containing it.
What's wrong with the following?
[module "infrastructure"]
submodule = lib
submodule = build
[module "lib"]
url = git://xyzzy/lib-1.2.3
[module "build"]
url = git://xyzzy/build-0.61
A module with a "url" attribute can be cloned from that url.
A module with one or more "submodule" attributes requires
these modules as well.
> > Why not allow a module to both contain smaller modules and be contained
> > in a bigger module?
>
> Because the "module" definition is _different_ from the "submodule"
> definition.
>From the point of view of the user, they are the same.
They can both be used as an argument to
git submodule checkout
> The "module" definition is just a level of indirection.
But why limit yourself to _one_ level of indirection?
If you call everything a "module" (or everything a "submodule")
then you get multiple levels of indirection for free.
skimo
prev parent reply other threads:[~2007-06-02 17:36 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-28 20:51 [PATCH] Let .git/config specify the url for submodules Lars Hjemli
2007-05-31 0:17 ` Lars Hjemli
2007-05-31 23:43 ` Junio C Hamano
2007-06-01 8:08 ` Josef Weidendorfer
2007-06-01 9:17 ` Lars Hjemli
2007-06-01 8:57 ` Sven Verdoolaege
2007-06-01 9:25 ` Lars Hjemli
2007-06-01 9:35 ` Sven Verdoolaege
2007-06-01 14:45 ` Lars Hjemli
2007-06-01 14:51 ` Sven Verdoolaege
2007-06-01 15:56 ` Lars Hjemli
2007-06-01 16:29 ` Linus Torvalds
2007-06-01 19:55 ` Junio C Hamano
2007-06-02 7:13 ` Lars Hjemli
2007-06-02 7:44 ` Sven Verdoolaege
2007-06-02 8:39 ` Lars Hjemli
2007-06-02 9:15 ` Junio C Hamano
2007-06-02 9:53 ` Lars Hjemli
2007-06-02 10:12 ` Junio C Hamano
2007-06-02 10:38 ` Lars Hjemli
2007-07-20 17:23 ` [PATCH] git-submodule fixes for call to git config --get-regexp Chris Larson
2007-07-20 18:07 ` Junio C Hamano
2007-07-20 18:36 ` Johannes Schindelin
2007-07-25 0:09 ` submodule init problem Ricky Nite
2007-07-25 0:30 ` Ricky Nite
2007-07-25 1:49 ` Junio C Hamano
2007-07-25 8:15 ` Sven Verdoolaege
2007-07-25 20:25 ` Lars Hjemli
2007-07-25 20:31 ` Johannes Schindelin
2007-07-25 20:40 ` Lars Hjemli
2007-07-25 20:50 ` Johannes Schindelin
2007-07-25 22:20 ` Junio C Hamano
2007-07-25 23:43 ` Ricky Nite
2007-07-25 23:49 ` Junio C Hamano
2007-06-02 7:49 ` [PATCH] Let .git/config specify the url for submodules Sven Verdoolaege
2007-06-02 16:34 ` Linus Torvalds
2007-06-02 17:35 ` Sven Verdoolaege [this message]
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=20070602173551.GC955MdfPADPa@greensroom.kotnet.org \
--to=skimo@kotnet.org \
--cc=git@vger.kernel.org \
--cc=hjemli@gmail.com \
--cc=junkio@cox.net \
--cc=skimo@liacs.nl \
--cc=torvalds@linux-foundation.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).