From 275cd184d52b5b81cb89e4ec33e540fb2ae61c1f Mon Sep 17 00:00:00 2001 From: Fredrik Gustafsson Date: Tue, 2 Jul 2013 23:42:56 +0200 Subject: Add --depth to submodule update/add Add the --depth option to the add and update commands of "git submodule", which is then passed on to the clone command. This is useful when the submodule(s) are huge and you're not really interested in anything but the latest commit. Tests are added and some indention adjustments were made to conform to the rest of the testfile on "submodule update can handle symbolic links in pwd". Signed-off-by: Fredrik Gustafsson Acked-by: Jens Lehmann Signed-off-by: Junio C Hamano --- Documentation/git-submodule.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'Documentation/git-submodule.txt') diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt index e5767134b1..605419f189 100644 --- a/Documentation/git-submodule.txt +++ b/Documentation/git-submodule.txt @@ -10,12 +10,12 @@ SYNOPSIS -------- [verse] 'git submodule' [--quiet] add [-b ] [-f|--force] [--name ] - [--reference ] [--] [] + [--reference ] [--depth ] [--] [] 'git submodule' [--quiet] status [--cached] [--recursive] [--] [...] 'git submodule' [--quiet] init [--] [...] 'git submodule' [--quiet] deinit [-f|--force] [--] ... 'git submodule' [--quiet] update [--init] [--remote] [-N|--no-fetch] - [-f|--force] [--rebase] [--reference ] + [-f|--force] [--rebase] [--reference ] [--depth ] [--merge] [--recursive] [--] [...] 'git submodule' [--quiet] summary [--cached|--files] [(-n|--summary-limit) ] [commit] [--] [...] @@ -328,6 +328,12 @@ for linkgit:git-clone[1]'s `--reference` and `--shared` options carefully. only in the submodules of the current repo, but also in any nested submodules inside those submodules (and so on). +--depth:: + This option is valid for add and update commands. Create a 'shallow' + clone with a history truncated to the specified number of revisions. + See linkgit:git-clone[1] + + ...:: Paths to submodule(s). When specified this will restrict the command to only operate on the submodules found at the specified paths. -- cgit v1.3