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

Re: [PATCH v2] Doc: document push.recurseSubmodules=only

From
JTJonathan Tan <jonathantanmy@google.com>
Date
Nov 15, 2022, 18:47 UTC
Message-ID
<20221115184702.169258-1-jonathantanmy@google.com>
In-Reply-To
<kl6lcz9pnic2.fsf@chooglen-macbookpro.roam.corp.google.com>
First of all, thanks for taking a look at this.
Glen Choo <chooglen@google.com> writes:
Show 8 quoted lines
> That said.. I find the status quo very surprising and unergonomic. As
> demonstrated in a test below, if a submodule has push.recurseSubmodules
> unset, recursion doesn't occur. At the very least, I would have expected
> the submodule to respect the superproject's config since that's still a
> statement of intent.
> 
> I expect that we will have to change this behavior at some point, and
> hopefully my "ideal" behavior makes sense to users.
Well, your "ideal" behavior makes sense to me :-)
Show 11 quoted lines
> When we pass this magic, undocumented value, "git push" will warn about
> about "only" and override it with "on-demand". We always pass it when we
> recurse into submodules, and we assume that no user will pass it, thus
> we get the warning iff we are recursing into submodules.
> 
> In that case, it sounds like "--recurse-submodules=only-is-on-demand" is
> a synonym for "this is a submodule that is being recursed into". In that
> case, wouldn't it be more self-documenting to have a hidden CLI flag
> that expresses exactly that ? e.g. we could add a PARSE_OPT_HIDDEN flag
> called "--is-recursing" and check that boolean value. This seems clearer
> to me at least.

Hmm...--recurse-submodules=only-is-on-demand is hidden too, right? One advantage of doing this instead of a separate arg is that neither the caller nor "git push" needs to think about what happens if both --recurse- submodules=something and --is-recursing are both specified.

Previous: Glen ChooNext: Glen Choo
Message 8 of 10 in “submodule: explicitly specify on-demand upon push”
  1. submodule: explicitly specify on-demand upon pushJonathan Tan, Nov 8, 2022
  2. Taylor BlauNov 8, 2022
  3. Jonathan TanNov 8, 2022
  4. Glen ChooNov 9, 2022
  5. Doc: document push.recurseSubmodules=onlyJonathan Tan, Nov 14, 2022
  6. Taylor BlauNov 14, 2022
  7. Glen ChooNov 15, 2022
  8. Jonathan TanNov 15, 2022
  9. Glen ChooNov 16, 2022
  10. Taylor BlauNov 16, 2022

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.