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

Re: [PATCH] Documentation: consolidate submodule.<name>.update

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 26, 2017, 01:30 UTC
Message-ID
<xmqqy3p2ckks.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20170925191726.GE35385@google.com>
Brandon Williams <bmwill@google.com> writes:
Show 16 quoted lines
>> +	The method by which a submodule is updated by 'git submodule update',
>> +	which is the only affected command, others such as
>> +	'git checkout --recurse-submodules' are unaffected. It exists for
>> +	historical reasons, when 'git submodule' was the only command to
>> +	interact with submodules; settings like `submodule.active`
>> +	and `pull.rebase` are more specific. It is copied to the config
>> +	by `git submodule init` from the .gitmodules file.
>> +	Allowed values here are 'checkout', 'rebase', 'merge' or 'none'.
>> +	See description of 'update' command in linkgit:git-submodule[1]
>> +	for their meaning. Note that the '!command' form is intentionally
>> +	ignored here for security reasons.
>
> This probably needs to be tweaked a bit to say that the '!command' form
> is ignored by submodule init, in that it isn't copied over from the
> .gitmodules file, but if it is configured in your config it will be
> respected by 'submodule update'.

I do not think gitmodules.txt is the place to say anything more than what Stefan's patch says above. Perhaps config.txt should mention that in addition to what the variable with the same in .gitmodules can take, it is allowed to use the !command form.

IOW, in config.txt
	submodule.<name>.update::
		Specifies how 'git submodule update' should work on
		the named submodule.  In addition to the values that
		can be specified in (and copied from) `.gitmodules`
		(see linkgit:gitmodules[5]), `!command` form can
		also be used.
or something, perhaps?
Previous: Jonathan Nieder
Message 12 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.