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 <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jens Lehmann committed
Nov 4, 2010 at 21:27 UTC
ccdd3da6527ca7d8d731e691b9ff0f9b8657298e
2 files changed
+5
-1
Documentation/git-clone.txt
+3
-1
@@ -12,7 +12,8 @@ SYNOPSIS
12
'git clone' [--template=<template_directory>]
13
[-l] [-s] [--no-hardlinks] [-q] [-n] [--bare] [--mirror]
14
[-o <name>] [-b <name>] [-u <upload-pack>] [--reference <repository>]
15
- [--depth <depth>] [--recursive] [--] <repository> [<directory>]
15
+ [--depth <depth>] [--recursive|--recurse-submodules] [--] <repository>
16
+ [<directory>]
17
18
DESCRIPTION
19
-----------
@@ -167,6 +168,7 @@ objects from the source repository into a pack in the cloned repository.
168
as patches.
169
170
--recursive::
171
+--recurse-submodules::
172
After the clone is created, initialize all submodules within,
173
using their default settings. This is equivalent to running
174
`git submodule update --init --recursive` immediately after
builtin/clone.c
+2
@@ -66,6 +66,8 @@ static struct option builtin_clone_options[] = {
66
"setup as shared repository"),
67
OPT_BOOLEAN(0, "recursive", &option_recursive,
68
"initialize submodules in the clone"),
69
+ OPT_BOOLEAN(0, "recurse_submodules", &option_recursive,
70
+ "initialize submodules in the clone"),
71
OPT_STRING(0, "template", &option_template, "path",
72
"path the template repository"),
73
OPT_STRING(0, "reference", &option_reference, "repo",