Re: [RFC] git-submodule: multiple-level modules definition

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 3, 2008 at 7:51 PM, Lars Hjemli <hjemli@xxxxxxxxx> wrote:
> On Mon, Mar 3, 2008 at 12:02 PM, Ping Yin <pkufranky@xxxxxxxxx> wrote:
>  >
>  > On Mon, Mar 3, 2008 at 2:57 PM, Lars Hjemli <hjemli@xxxxxxxxx> wrote:
>  >  > On Mon, Mar 3, 2008 at 2:47 AM, Ping Yin <pkufranky@xxxxxxxxx> wrote:
>  >  >  >  But why always
>  >  >  >  use git init even when we don't have the local configuration
>  >  >  >  requirement?
>  >  >
>  >  >  We need a way to tell git which of those submodules we are interested
>  >  >  in, i.e. which submodules to clone/fetch during 'git submodule
>  >  >  update'.
>  >  >
>  >  Now that's easy with the multiple level module definition. We can now
>  >  group our modules by hierachy and designate modules we are interested
>  >  by logical names such as crawler or search as my proposal has
>  >  mentioned.
>
>  Sorry, you've lost me here. How is 'git submodule update' going to
>  avoid cloning/fetching all submodules with your proposal?
>
>  PS: the supposed work-flow is an initial 'git submodule init foo bar
>  baz' (i.e. register the submodules you're interested in checking out)
>  followed by an occasional 'git submodule update' (i.e. update all the
>  submodules you are interested in).
>

See my first email. In following .gitmodules example, we can use "git
submodule update service" to update all sub-submodules of submodule
"service" (util, imsearch, imcrawler). We don't have to do "git init"
first.

Without the multiple level module definition, "git init" is good idea,
since every time we want to 'git update', we needn't give so many
module paths. However, if we introduce multiple level module
definition, we can define the module groups we are interested such as
crawler, search and the toppest group service. So we just need to type
one or few module names which makes "git init" not so useful.

And it's more flexible by using module name: at one time we can update
"cralwer" module group, and at another time we can update "search"
module group.


.gitmodules example
------------------------------------------------------
[submodule "service"]
   submodule = crawler
   submodule = search
[submodule "crawler"]
   submodule = util
   submodule = imcrawter
[submodule "search"]
   submodule = util
   submodule = imsearch
[submodule "util"]                      (1)
   url = git://xyzzy/util.git
[submodule "imsearch"]
   path = search/imsearch
   url = git://xyzzy/imsearch.git
[submodule "imcrawler"]
   path = crawler/imcrawter
   url = git://xyzzy/imcrawter.git
------------------------------------------------------
>  --
>  lh
>



-- 
Ping Yin
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux