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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 24, 2016, 00:13 UTC
Message-ID
<xmqqlh58bun7.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<CAGZ79kaEmDFDf+1BZV1C5ETswbXmAUYk_OMsZf_ka6tJ=pfwcQ@mail.gmail.com>
Stefan Beller <sbeller@google.com> writes:
Show 29 quoted lines
> 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.

Previous: Stefan BellerNext: Stefan Beller
Message 18 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.