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

[PATCHv2] document submodule sync --recursive

From
Stefan Beller <sbeller@google.com>
Date
Dec 3, 2015, 20:41 UTC
Message-ID
<1449175262-3724-1-git-send-email-sbeller@google.com>
In-Reply-To
<CAGZ79kaX4ZM++jhPcpU0T8eYDobME=iNtbH3KceWbQOOavpHnA@mail.gmail.com>
The git-submodule(1) is inconsistent. In the synopsis, it says:
       git submodule [--quiet] sync [--recursive] [--] [<path>...]

The description of the sync does not mention --recursive, and the description of --recursive says that it is only available for foreach, update and status.

The option was introduced (82f49f294c, Teach --recursive to submodule sync, 2012-10-26) a while ago, so let's document it, too.

Reported-by: Per Cederqvist <cederp@opera.com>
Signed-off-by: Stefan Beller <sbeller@google.com>
---
 This applies on either origin/master or origin/maint.
 
 Thanks,
 Stefan
 
 Documentation/git-submodule.txt | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt
index f17687e..1572f05 100644
--- a/Documentation/git-submodule.txt
+++ b/Documentation/git-submodule.txt
@@ -237,6 +237,9 @@ sync::
 +
 "git submodule sync" synchronizes all submodules while
 "git submodule sync \-- A" synchronizes submodule "A" only.
++
+If `--recursive` is specified, this command will recurse into the
+registered submodules, and sync any nested submodules within.
 
 OPTIONS
 -------
@@ -364,7 +367,7 @@ the submodule itself.
 for linkgit:git-clone[1]'s `--reference` and `--shared` options carefully.
 
 --recursive::
-	This option is only valid for foreach, update and status commands.
+	This option is only valid for foreach, update, status and sync commands.
 	Traverse submodules recursively. The operation is performed not
 	only in the submodules of the current repo, but also
 	in any nested submodules inside those submodules (and so on).
-- 
2.6.1.255.gcc3df29.dirty
Previous: Stefan BellerNext: Junio C Hamano
Message 4 of 5 in “document submodule sync --recursive”
  1. document submodule sync --recursiveStefan Beller, Dec 3, 2015
  2. Junio C HamanoDec 3, 2015
  3. Stefan BellerDec 3, 2015
  4. [PATCHv2] document submodule sync --recursiveStefan Beller, Dec 3, 2015
  5. Junio C HamanoDec 4, 2015

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.