On Thu, Jan 21, 2016 at 1:17 PM, Sebastian Schuberth
<[email protected]> wrote:
> On 20.01.2016 04:34, Stefan Beller wrote:
>
>> So you could have a .gitmodules file such as:
>>
>> [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?
>
> Anyway, if it's only one group per line, I'd find it more fitting to call the
> entry "group" instead of "groups" as it will always refer to a single group
> only. Also that would better match the "--group" command line option naming
> for "submodule add".
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?
So for git clone, we'd rather use "--init-submodule" which can be passed a
name, path or group.
For storing that selection we'd go with "submodule.autoInitialize" in
.git /config.
The third user visible place submodule.$NAME.group however can stay in that
variable name as to point out the the concept of a submodule set/collection.
The groups concept may be used in the future for more than initialzing
submodules.
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/*
This may be more handy from our perspective (while designing it and
writing the code),
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?"
>
> However, if I'd read the single line "group = default" in a .gitmodules file,
> it wouldn't be immediately clear to me that "group" can appear multiple times
> per submodule. "groups = default" would me more hinting is this regard
> because the plural is used, but without reading the docs I'd assume multiple
> groups would be specified like "groups = default,devel".
>
> Long story short, my personal favorite still would be
>
> [submodule "gcc"]
> groups = default,devel
>
> followed by
>
> [submodule "gcc"]
> group = default
> group = devel
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
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)
Thanks,
Stefan
>
> --
> Sebastian Schuberth
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html