summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorJohan Herland <johan@herland.net>2009-08-19 03:45:23 +0200
committerJunio C Hamano <gitster@pobox.com>2009-08-18 22:59:12 -0700
commitb13fd5c1a2bd450cdf7b853e0c4861f361882a18 (patch)
tree018a5a1d768bc24e4a84c6ad32da32d202adf3df /Documentation
parent15fc56a853648c60697df691c5cd8a11ad718611 (diff)
downloadgit-b13fd5c1a2bd450cdf7b853e0c4861f361882a18.tar.gz
git submodule update: Introduce --recursive to update nested submodules
In very large and hierarchically structured projects, one may encounter nested submodules. In these situations, it is valuable to not only update the submodules in the current repo (which is what is currently done by 'git submodule update'), but also to operate on all submodules at all levels (i.e. recursing into nested submodules as well). This patch teaches the new --recursive option to the 'git submodule update' command. The patch also includes documentation and selftests. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/git-submodule.txt7
1 files changed, 5 insertions, 2 deletions
diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt
index 326136a85b..55bbc4f930 100644
--- a/Documentation/git-submodule.txt
+++ b/Documentation/git-submodule.txt
@@ -14,7 +14,7 @@ SYNOPSIS
'git submodule' [--quiet] status [--cached] [--] [<path>...]
'git submodule' [--quiet] init [--] [<path>...]
'git submodule' [--quiet] update [--init] [-N|--no-fetch] [--rebase]
- [--reference <repository>] [--merge] [--] [<path>...]
+ [--reference <repository>] [--merge] [--recursive] [--] [<path>...]
'git submodule' [--quiet] summary [--cached] [--summary-limit <n>] [commit] [--] [<path>...]
'git submodule' [--quiet] foreach [--recursive] <command>
'git submodule' [--quiet] sync [--] [<path>...]
@@ -122,6 +122,9 @@ update::
If the submodule is not yet initialized, and you just want to use the
setting as stored in .gitmodules, you can automatically initialize the
submodule with the --init option.
++
+If '--recursive' is specified, this command will recurse into the
+registered submodules, and update any nested submodules within.
summary::
Show commit summary between the given commit (defaults to HEAD) and
@@ -213,7 +216,7 @@ OPTIONS
for linkgit:git-clone[1]'s --reference and --shared options carefully.
--recursive::
- This option is only valid for the foreach command.
+ This option is only valid for foreach and update 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).