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

Re: [PATCH] doc: remove mentions of .gitmodules !command syntax

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 12, 2023, 16:40 UTC
Message-ID
<xmqqleflt75z.fsf@gitster.g>
In-Reply-To
<20230712160216.855054-1-pvutov@imap.cc>
pvutov@imap.cc writes:
Show 10 quoted lines
> From: Petar Vutov <pvutov@imap.cc>
>
> To mitigate CVE-2019-19604, the capability to configure
> `git submodule update` to execute custom commands was
> removed in v2.20.2.
>
> The git-submodule documentation still mentions the now-unsupported
> syntax, which is misleading.
>
> Remove the leftover documentation.

The change during v2.20.2 timeperiod you have in mind may be e904deb8 (submodule: reject submodule.update = !command in .gitmodules, 2019-12-05). The key phrase is "in .gitmodules" as it did not forbid writing update command in the configuration.

The pre-context lines of your patch (see below) say that the 'custom command' option and 'none' option are only available via the `submodule.<name>.update` configuration variable. IOW, this part of the documentation does not talk about the .gitmodules file---it talks about what you can say in the configuration file (which is under your local control).

I think the existing text that came from fc01a5d2 (submodule update documentation: don't repeat ourselves, 2016-12-27) may be misleading, and may has room for improvement, but I do not think it is wrong per-se. If we remove it, there is nowhere else that teaches users !cmd can be set in their configuration files, or is there?

Thanks.
Show 22 quoted lines
> Signed-off-by: Petar Vutov <pvutov@imap.cc>
> ---
>  Documentation/git-submodule.txt | 6 ------
>  1 file changed, 6 deletions(-)
>
> diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt
> index 4d3ab6b9f9..b40ac72f75 100644
> --- a/Documentation/git-submodule.txt
> +++ b/Documentation/git-submodule.txt
> @@ -163,12 +163,6 @@ checked out in the submodule.
>  The following 'update' procedures are only available via the
>  `submodule.<name>.update` configuration variable:
>  
> -	custom command;; arbitrary shell command that takes a single
> -	    argument (the sha1 of the commit recorded in the
> -	    superproject) is executed. When `submodule.<name>.update`
> -	    is set to '!command', the remainder after the exclamation mark
> -	    is the custom command.
> -
>  	none;; the submodule is not updated.
>  
>  If the submodule is not yet initialized, and you just want to use the
Previous: pvutov@imap.ccNext: Petar Vutov
Message 2 of 22 in “doc: remove mentions of .gitmodules !command syntax”
  1. doc: remove mentions of .gitmodules !command syntaxpvutov@imap.cc, Jul 12, 2023
  2. Junio C HamanoJul 12, 2023
  3. Petar VutovJul 12, 2023
  4. Junio C HamanoJul 12, 2023
  5. Petar VutovJul 12, 2023
  6. Junio C HamanoJul 12, 2023
  7. Petar VutovJul 13, 2023
  8. Junio C HamanoJul 13, 2023
  9. 1/1 docs: highlight that .gitmodules does not support !commandpvutov@imap.cc, Jul 13, 2023
  10. Junio C HamanoJul 13, 2023
  11. Petar VutovJul 13, 2023
  12. Junio C HamanoJul 13, 2023
  13. Petar VutovJul 13, 2023
  14. Junio C HamanoJul 13, 2023
  15. Junio C HamanoJul 13, 2023
  16. Petar VutovJul 13, 2023
  17. Junio C HamanoJul 13, 2023
  18. Petar VutovJul 14, 2023
  19. Junio C HamanoJul 25, 2023
  20. doc: highlight that .gitmodules does not support !commandpvutov@imap.cc, Jul 25, 2023
  21. Junio C HamanoJul 25, 2023
  22. docs: highlight that .gitmodules does not support !commandpvutov@imap.cc, Jul 13, 2023

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.