git/list[1] front-page[2] threads[3] people[4] search[5] about
 

recurse_submodules vs recurse-submodules

From
Chris Packham <judge.packham@gmail.com>
Date
Feb 10, 2011, 22:59 UTC
Message-ID
<AANLkTimppKC_CsN6hc4xGqtMBk8p2QEFjHYRWesKK8_r@mail.gmail.com>
Hi,
Just noticed this in git 1.7.4
  git clone -h
  ...
      --recursive           initialize submodules in the clone
      --recurse_submodules  initialize submodules in the clone
  git fetch -h
  ...
     --recurse-submodules  control recursive fetching of submodules

The recurse_submodules option for git clone was added in ccdd3da6 I'm guessing it wasn't Jens' intention to use an underscore instead of a hypen. Also as it is fairly new it should be safe to correct without worrying about retaining the incorrect option for backwards compatibility.

Here's my attempt at a fix
----8<----
From 24c582c2c9bc4f66980679a20d3eb9de6a031071 Mon Sep 17 00:00:00 2001
From: Chris Packham <chris.packham@alliedtelesis.co.nz>
Date: Fri, 11 Feb 2011 11:31:06 +1300
Subject: [PATCH] clone: fixup recurse_submodules option

The recurse_submodules option was added in ccdd3da6 to bring 'git clone' into line with 'git fetch' and future commands. The correct option should have been "recurse-submodules".

Signed-off-by: Chris Packham <judge.packham@gmail.com>
---
 builtin/clone.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/builtin/clone.c b/builtin/clone.c
index 61e0989..82a6938 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -66,7 +66,7 @@ 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,
+	OPT_BOOLEAN(0, "recurse-submodules", &option_recursive,
 		    "initialize submodules in the clone"),
 	OPT_STRING(0, "template", &option_template, "path",
 		   "path the template repository"),
-- 
1.7.4
Next: Junio C Hamano
Message 1 of 2 in “recurse_submodules vs recurse-submodules”
  1. Chris PackhamFeb 10, 2011
  2. Junio C HamanoFeb 11, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.