From: Jens Lehmann Date: Thu, 4 Nov 2010 20:27:12 +0000 (+0100) Subject: clone: Add the --recurse-submodules option as alias for --recursive X-Git-Tag: v1.7.4-rc0~102^2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ccdd3da6527ca7d8d731e691b9ff0f9b8657298e;p=git.git clone: Add the --recurse-submodules option as alias for --recursive Since 1.6.5 "git clone" honors the --recursive option to recursively check out submodules too. As this option can easily be misinterpreted when it is added to other commands like "git grep", add the new --recurse-submodules option as an alias for --recursive so the same option can be used for all commands recursing into submodules. Signed-off-by: Jens Lehmann Signed-off-by: Junio C Hamano --- diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt index ab7293351..d69984b27 100644 --- a/Documentation/git-clone.txt +++ b/Documentation/git-clone.txt @@ -12,7 +12,8 @@ SYNOPSIS 'git clone' [--template=] [-l] [-s] [--no-hardlinks] [-q] [-n] [--bare] [--mirror] [-o ] [-b ] [-u ] [--reference ] - [--depth ] [--recursive] [--] [] + [--depth ] [--recursive|--recurse-submodules] [--] + [] DESCRIPTION ----------- @@ -167,6 +168,7 @@ objects from the source repository into a pack in the cloned repository. as patches. --recursive:: +--recurse-submodules:: After the clone is created, initialize all submodules within, using their default settings. This is equivalent to running `git submodule update --init --recursive` immediately after diff --git a/builtin/clone.c b/builtin/clone.c index 19ed64041..61e0989b5 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -66,6 +66,8 @@ static struct option builtin_clone_options[] = { "setup as shared repository"), OPT_BOOLEAN(0, "recursive", &option_recursive, "initialize submodules in the clone"), + OPT_BOOLEAN(0, "recurse_submodules", &option_recursive, + "initialize submodules in the clone"), OPT_STRING(0, "template", &option_template, "path", "path the template repository"), OPT_STRING(0, "reference", &option_reference, "repo",