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

Re: [PATCH] Documentation/config: clarify the meaning of submodule.<name>.update

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Sep 22, 2017, 21:37 UTC
Message-ID
<20170922213740.GL27425@aiede.mtv.corp.google.com>
In-Reply-To
<20170922212818.9958-1-sbeller@google.com>
Hi,
Stefan Beller wrote:
Show 5 quoted lines
> With more commands (that potentially change a submodule) paying attention
> to submodules as well as the recent discussion[1] on submodule.<name>.update,
> let's spell out that submodule.<name>.update is strictly to be used
> for configuring the "submodule update" command and not to be obeyed
> by other commands.
Good idea, thank you.
You'll want to update Documentation/gitmodules.txt, too.

I think this can go further: it should say explicitly that commands like "git checkout --recurse-submodules" do not pay attention to this option.

Show 5 quoted lines
> These other commands usually have a strict meaning of what they should
> do (i.e. checkout, reset, rebase, merge) as well as have their name
> overlapping with the modes possible for submodule.<name>.update.
>
> [1] https://public-inbox.org/git/4283F0B0-BC1C-4ED1-8126-7E512D84484B@gmail.com/

Can you summarize what this discussion concluded with so the reader does not have to look far to understand it?

> Signed-off-by: Stefan Beller <sbeller@google.com>
Reported-by: Lars Schneider <larsxschneider@gmail.com>
Show 20 quoted lines
> ---
>  Documentation/config.txt | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/config.txt b/Documentation/config.txt
> index dc4e3f58a2..b0ded777fe 100644
> --- a/Documentation/config.txt
> +++ b/Documentation/config.txt
> @@ -3085,10 +3085,9 @@ submodule.<name>.url::
>  	See linkgit:git-submodule[1] and linkgit:gitmodules[5] for details.
>  
>  submodule.<name>.update::
> -	The default update procedure for a submodule. This variable
> -	is populated by `git submodule init` from the
> -	linkgit:gitmodules[5] file. See description of 'update'
> -	command in linkgit:git-submodule[1].
> +	The method how a submodule is updated via 'git submodule update'.
> +	It is populated by `git submodule init` from the linkgit:gitmodules[5]
> +	file. See description of 'update' command in linkgit:git-submodule[1].
>  
Wording nits: s/The method how/The method by which/; s/via/by/

More importantly, can this be more explicit about how it is meant to be used? E.g. to say

 1. This only affects "git submodule update" and doesn't affect
    commands like "git checkout --recurse-submodules".
 2. It exists for historical reasons; settings like submodule.active
    and pull.rebase are more likely to be what someone is looking for.

Thanks and hope that helps, Jonathan

Previous: Stefan BellerNext: Stefan Beller
Message 2 of 12 in “Documentation/config: clarify the meaning of submodule.<name>.update”
  1. Documentation/config: clarify the meaning of submodule.<name>.updateStefan Beller, Sep 22, 2017
  2. Jonathan NiederSep 22, 2017
  3. [PATCHv2] Documentation/config: clarify the meaning of submodule.<name>.updateStefan Beller, Sep 22, 2017
  4. Jonathan NiederSep 22, 2017
  5. Junio C HamanoSep 23, 2017
  6. Documentation: consolidate submodule.<name>.updateStefan Beller, Sep 25, 2017
  7. Brandon WilliamsSep 25, 2017
  8. Stefan BellerSep 25, 2017
  9. Jonathan NiederSep 25, 2017
  10. Stefan BellerSep 25, 2017
  11. Jonathan NiederSep 25, 2017
  12. Junio C HamanoSep 26, 2017

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.