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

[PATCH v3 1/1] docs: highlight that .gitmodules does not support !command

From
pvutov@imap.cc <pvutov@imap.cc>
Date
Jul 13, 2023, 19:33 UTC
Message-ID
<20230713193342.1053968-1-pvutov@imap.cc>
In-Reply-To
<d775437e-7fa3-189b-a1c3-4fd358dd9768@imap.cc>
From: Petar Vutov <pvutov@imap.cc>

Bugfix for fc01a5d2 (submodule update documentation: don't repeat ourselves, 2016-12-27).

The `custom command` and `none` entries are described as sharing the same limitations, but one is allowed in .gitmodules and the other is not. Instead, describe their limitations separately and in slightly more detail.

Signed-off-by: Petar Vutov <pvutov@imap.cc>
---

Changes from v1: Don't delete the documentation for `!command`. Instead, highlight the differences in the limitations of `none` and `!command`.

Changes from v2: Improve phrasing. Add the bugfix blurb in the commit message.

 Documentation/git-submodule.txt | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt
index 4d3ab6b9f9..69ee2cd6b0 100644
--- a/Documentation/git-submodule.txt
+++ b/Documentation/git-submodule.txt
@@ -160,16 +160,19 @@ checked out in the submodule.
 	merge;; the commit recorded in the superproject will be merged
 	    into the current branch 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.
++
+Custom commands are only allowed in the `submodule.<name>.update`
+git-config variable. They cannot be used in the .gitmodules file.
 
 	none;; the submodule is not updated.
++
+The `none` update procedure is allowed in the .gitmodules file
+or the `submodule.<name>.update` git-config variable.
 
 If the submodule is not yet initialized, and you just want to use the
 setting as stored in `.gitmodules`, you can automatically initialize the
-- 
2.41.0
Previous: Junio C HamanoNext: Junio C Hamano
Message 9 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.