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

Re: [RFC_PATCHv4 5/7] submodule update: respect submodule.actionOnLabel

From
Stefan Beller <sbeller@google.com>
Date
Mar 24, 2016, 19:54 UTC
Message-ID
<CAGZ79kZCHv6z6zT2Q2MzMNXfGWcqk9uxsqQ-uEjAPw3h+cSjsQ@mail.gmail.com>
In-Reply-To
<xmqqlh58bun7.fsf@gitster.mtv.corp.google.com>
On Wed, Mar 23, 2016 at 5:13 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 64 quoted lines
> Stefan Beller <sbeller@google.com> writes:
>
>> On Tue, Mar 22, 2016 at 3:40 PM, Junio C Hamano <gitster@pobox.com> wrote:
>>> Stefan Beller <sbeller@google.com> writes:
>>>
>>>> This change introduces the 'submodule.actionOnLabel' variable
>>>> in a repository configuration. Generally speaking 'submodule.actionOnLabel'
>>>> restricts the action of a command when no submodules are selected via the
>>>> command line explicitely to those submodules, which are selected by
>>>> 'submodule.actionOnLabel'. It can occur multiple times and can specify
>>>> the path, the name or one of the labels of a submodule to select that
>>>> submodule.
>>>>
>>>> The introduction of 'submodule.actionOnLabel' starts with
>>>> 'git submodule update' in this patch and other commands will follow
>>>> in later patches.
>>>>
>>>> 'submodule.actionOnLabel' implies '--init' in 'git submodule update'.
>>>>
>>>> Signed-off-by: Stefan Beller <sbeller@google.com>
>>>>
>>>> TODO: generic documentation for submodule.actionOnLabel
>>>> TODO: documentation for submodule update
>>>
>>> TODO: a name that matches the concept better.
>>
>> This is one of the hardest parts of the series so far. The last reviews
>> were mostly bike shedding about the name of the concept and I thought
>> we were settled to actionOnLabel as that fits best to what we want to do.
>>
>> So let's revisit that. My current understanding of the design:
>
> I am not questioning the name "label" to call the facility that
> allows projects to group submodules together, and that serves as one
> of the ways to choose what subset of submodules are worked on by
> default.  There is no need to revisit that part.
>
> What I am questioning is
>
>         action On Label
>
> because
>
>  (1) it sounds as if that configuration were a way to choose what
>      action is done to the chosen subset of submodules;
>
>  (2) it sounds as if the only way to choose a subset of submodules
>      to be operated on by default is via the "label" mechanism.
>
> And from your writing (omitted), I think we agree that we definitely
> want to avoid the misunderstanding that is (1).  This variable does
> not specify what is done--this specifies what subset of submodules
> are to be operated on.  Having "action" in the name of the variable
> is wrong.
>
> And from the proposed log message, it is clear that "label" is not
> the only way to specify the subset of submodules to be worked on,
> i.e. "... can specify the path, name or the labels".   Having
> "label" in the variable name is wrong.
>
> I am tempted to suggest submodule.defaultOperand and I am fairly
> sure "default" part of that name gets the concept much better than
> "actionOnLabel", but there probably are much better words than
> Operand.

I immediately thought of defaultActionset, because "default", as well as the "actionset" conveys the concept of choosing a subset of submodules to operate on. However You may mistake it as defaultActionSet, i.e. what action is set by default.

Maybe we can revive the term "group" and call it submodule.defaultGroup. The defaultGroup is defined by selection of names, paths and labels.

Previous: Junio C HamanoNext: Junio C Hamano
Message 19 of 22 in “[RFC_PATCHv4 0/7] Git submodule labels”
  1. Stefan BellerMar 22, 2016
  2. 1/7 git submodule: teach `add` to label submodulesStefan Beller, Mar 22, 2016
  3. Junio C HamanoMar 22, 2016
  4. Junio C HamanoMar 22, 2016
  5. 2/7 submodule-config: keep labels aroundStefan Beller, Mar 22, 2016
  6. 3/7 submodule-config: add method to check for being labeledStefan Beller, Mar 22, 2016
  7. Junio C HamanoMar 22, 2016
  8. Stefan BellerMar 23, 2016
  9. 4/7 submodule init: redirect stdout to stderrStefan Beller, Mar 22, 2016
  10. Sebastian SchuberthMar 22, 2016
  11. Junio C HamanoMar 22, 2016
  12. Stefan BellerMar 22, 2016
  13. Sebastian SchuberthMar 22, 2016
  14. Junio C HamanoMar 22, 2016
  15. 5/7 submodule update: respect submodule.actionOnLabelStefan Beller, Mar 22, 2016
  16. Junio C HamanoMar 22, 2016
  17. Stefan BellerMar 23, 2016
  18. Junio C HamanoMar 24, 2016
  19. Stefan BellerMar 24, 2016
  20. Junio C HamanoMar 24, 2016
  21. 6/7 clone: allow specification of submodules to be clonedStefan Beller, Mar 22, 2016
  22. 7/7 WIP status/diff: respect submodule.actionOnLabelStefan Beller, Mar 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.