]> asedeno.scripts.mit.edu Git - git.git/commitdiff
clone: Add the --recurse-submodules option as alias for --recursive
authorJens Lehmann <Jens.Lehmann@web.de>
Thu, 4 Nov 2010 20:27:12 +0000 (21:27 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 5 Nov 2010 17:28:01 +0000 (10:28 -0700)
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>
Documentation/git-clone.txt
builtin/clone.c

index ab7293351d283e7ee3a8275c534c3667d6b4d696..d69984b27cb4b0c8595dfcf177208dbfe0b01669 100644 (file)
@@ -12,7 +12,8 @@ SYNOPSIS
 'git clone' [--template=<template_directory>]
          [-l] [-s] [--no-hardlinks] [-q] [-n] [--bare] [--mirror]
          [-o <name>] [-b <name>] [-u <upload-pack>] [--reference <repository>]
-         [--depth <depth>] [--recursive] [--] <repository> [<directory>]
+         [--depth <depth>] [--recursive|--recurse-submodules] [--] <repository>
+         [<directory>]
 
 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
index 19ed64041d0575ee1ad49071dfe1e671114b8ae3..61e0989b5ab8fffb16ec28e64c38b4fa236cb3ed 100644 (file)
@@ -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",