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

Re: [PATCH 5/5] builtin/clone: support submodule groups

From
Stefan Beller <sbeller@google.com>
Date
Nov 25, 2015, 22:51 UTC
Message-ID
<CAGZ79kbOO=-nXj5htrg8GXV-iH-62gVwVb_SAGtbz3DOWXC=rg@mail.gmail.com>
In-Reply-To
<5656366D.4010508@web.de>
On Wed, Nov 25, 2015 at 2:30 PM, Jens Lehmann <Jens.Lehmann@web.de> wrote:
Show 16 quoted lines
>>
>>
>> I like the concept of subgroups as it allows to have some control over
>> subsubmodules you may want to aggregate from a third party via the
>> middleman submodule.
>
>
> That's the point (though maybe someone might come up with a better
> name than "subgroups" ;-). And each repo configures its own submodule
> groups.
>
>> I'd prefer to delay that feature though by not giving a high priority.
>
>
> No problem, we can start with "check out all subsubmodules" for now.
> But I suspect we'll need subgroups rather sooner than later.

Oh! I thought we'd recursively propagate the groups, so the subsubmodules are checked to be either in groups or subgroups, and the subgroups are just a way to enhance the union of groups.

Show 7 quoted lines
>
>> Also would you go with subsubgroups, too? When does the recursion
>> end?
>
>
> Subsubgroups do not make sense in the superproject, that can only
> configure its direct submodules.
Show 5 quoted lines
> I think you are talking about the
> groups of the subsubmodules, and these have to be chosen inside the
> first level submodules via the subgroups of its submodules (which
> are the second level submodules of the superproject). Still with
> me? ;-)
I believe so.
> So the recursion can go on forever even as soon as we
> implement the subgroup configuration.

So lets say you have your meta collection repository, which looks like that:

operating systems:
    ubuntu
        linux
        nonfree-game
        ...
    gentoo
        ...
    fedora
        ...
    android
        linux
        linux-build-configs
            vendor-phones
            nexus-family

In the "operating systems" repo I have the submodules ubuntu and android marked via a group: "work-related".

Now I want to specify to have the linux, linux-build-configs, and in there the nexus-family in the android repository.

One way would be to have the "operating systems" repo to have subsubgroups specifying the groups in the submodules of linux-build-configs (3rd level of submodules). You seem to oppose that.

The other way to do that, would be to have a fork of the android repo and put in the right subgroups to select for the right submodules in linux-build-configs. So forking and fixing the groups config would be the way to make changes from upstream.

I personally would find it easier to have all the spec in the one superproject repository as then I don't need to update the forks. (the .gitmodules file would get some conflicts, in case of my fork there, so it's not easy to maintain long term)

Is there yet another way to handle such a case of deeply nested submodules properly?

Show 9 quoted lines
>
>> In case we have more than the union of groups, but also prohibitive
>>
>> terms available, could subgroups clash with the submodules groups spec?
>
>
> Not that I'm aware of. Groups decide which submodules to update and
> only for those submodules subgroups tell git what group to use inside
> that submodule. And so on.
Previous: Jens LehmannNext: Stefan Beller
Message 12 of 24 in “Submodule Groups”
  1. 0/5 Submodule GroupsStefan Beller, Nov 25, 2015
  2. 1/5 submodule-config: keep submodule groups aroundStefan Beller, Nov 25, 2015
  3. 2/5 git submodule add can add a submodule with groupsStefan Beller, Nov 25, 2015
  4. 3/5 git submodule init to pass on groupsStefan Beller, Nov 25, 2015
  5. 4/5 submodule--helper: module_list and update-clone have --groups optionStefan Beller, Nov 25, 2015
  6. 5/5 builtin/clone: support submodule groupsStefan Beller, Nov 25, 2015
  7. Jens LehmannNov 25, 2015
  8. Stefan BellerNov 25, 2015
  9. Jens LehmannNov 25, 2015
  10. Stefan BellerNov 25, 2015
  11. Jens LehmannNov 25, 2015
  12. Stefan BellerNov 25, 2015
  13. [PATCHv2] builtin/clone: support submodule groupsStefan Beller, Nov 26, 2015
  14. Stefan BellerNov 26, 2015
  15. Trevor SaundersNov 26, 2015
  16. Stefan BellerNov 30, 2015
  17. Michael J GruberDec 1, 2015
  18. Stefan BellerDec 1, 2015
  19. Jens LehmannNov 25, 2015
  20. Stefan BellerNov 25, 2015
  21. Jens LehmannNov 25, 2015
  22. Stefan BellerNov 30, 2015
  23. Jens LehmannDec 1, 2015
  24. Jens LehmannNov 25, 2015

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.