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

Re: [PATCH 0/4] Submodule Groups

From
Sebastian Schuberth <sschuberth@gmail.com>
Date
Jan 22, 2016, 08:55 UTC
Message-ID
<CAHGBnuMRd3bg4KYito08U8LJNC3JAJFBVz-APZxVJyd6WKO6TQ@mail.gmail.com>
In-Reply-To
<CAGZ79ka+LZHRjVB8bZ4u+-n-U06mUWsbx9nRVCvd4aPwrb7yHQ@mail.gmail.com>
On Thu, Jan 21, 2016 at 10:56 PM, Stefan Beller <sbeller@google.com> wrote:
Show 10 quoted lines
>>> [submodule "gcc"]
>>>          path = gcc
>>>          url = git://...
>>>          groups = default
>>>          groups = devel
>>
>> On the quick I was unable to find the rationale why entries are now stored as separated lines compared to v1. I liked the comma-separated approach better as it's more compact.
>
> IIUC the line oriented way is preferred as it is our standard. Do we
> have any other options stored as a comma separated list?

Out of my head I cannot think of any. But that shouldn't mean we cannot introduce such comma separated list if it makes sense.

> Makes sense to use singular then. However per discussion with Junio in
> [PATCH 3/4] submodule update: Initialize all group-selected submodules
> by default, we want to not name it "group", as it's unclear what a group is
> supposed to mean. What does a group do? which operations are supported?

How about calling it "label" instead of "group"? IMO with the word "label" it's more clean that a single submodule can have multiple labels, as the concept of labels is familiar to the user already from applications like Firefox (bookmarks), Google Mail, Mac OS X Finder (files) etc.

Show 10 quoted lines
> Instead of having a submodule -> set assignment, we could do it the
> other way round:
>
>      [submodule "gcc"]
>          ...
>
>      [submodule-set "default"]
>         submodule = gcc
>         submodule = foo
>         submodule = by/path/*

In your example you're now introducing "set" as a new term. Shouldn't this better be "submodule-group" then? I actually like this idea quite a bit as it completely solves the problem about being clear that a submodule can belong to mutiple groups.

> but I'd assume this is less useful for the user. How often does a user ask:
> "How many/Which submodules are in $GROUP" as opposed to "What about
> submodule foo,
> is that part of group $GROUP?"

True, but for answering that question a user would not look at .gitmodules, but run a command, and the implementation of that command would completely hide that complexity from the user.

> As asked above, how many comma separated things do we have in git configs?
> I'd really not want to add more mental complexity to Git. As far as I
I don't think it can get much worse anyway ;-)
> remember we have
> rather double configs than one long line separated somehow.
> (The only thing that comes to mind is multiple remote urls for pushing)

I believe so, too. But I'd see the introduction of comma-separated values as an exit-strategy to that. More settings could make use of that in the future, then.

-- 
Sebastian Schuberth
Previous: Junio C Hamano
Message 27 of 27 in “Submodule Groups”
  1. 0/4 Submodule GroupsStefan Beller, Jan 20, 2016
  2. 1/4 git submodule: Teach add to accept --groupStefan Beller, Jan 20, 2016
  3. Junio C HamanoJan 20, 2016
  4. Stefan BellerJan 20, 2016
  5. Junio C HamanoJan 21, 2016
  6. Stefan BellerJan 21, 2016
  7. Junio C HamanoJan 21, 2016
  8. 2/4 submodule-config: keep groups aroundStefan Beller, Jan 20, 2016
  9. Junio C HamanoJan 20, 2016
  10. Stefan BellerJan 21, 2016
  11. Junio C HamanoJan 21, 2016
  12. 3/4 submodule update: Initialize all group-selected submodules by defaultStefan Beller, Jan 20, 2016
  13. Junio C HamanoJan 20, 2016
  14. Stefan BellerJan 21, 2016
  15. Junio C HamanoJan 21, 2016
  16. Stefan BellerJan 21, 2016
  17. Junio C HamanoJan 21, 2016
  18. Junio C HamanoJan 21, 2016
  19. 4/4 builtin/clone: support submodule groupsStefan Beller, Jan 20, 2016
  20. Junio C HamanoJan 20, 2016
  21. Sebastian SchuberthJan 21, 2016
  22. Stefan BellerJan 21, 2016
  23. Junio C HamanoJan 21, 2016
  24. Junio C HamanoJan 21, 2016
  25. Stefan BellerJan 21, 2016
  26. Junio C HamanoJan 21, 2016
  27. Sebastian SchuberthJan 22, 2016

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.