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

[PATCH 2/3] submodules: add RECURSE_SUBMODULES_ONLY value

From
BWBrandon Williams <bmwill@google.com>
Date
Dec 19, 2016, 18:25 UTC
Message-ID
<1482171933-180601-3-git-send-email-bmwill@google.com>
In-Reply-To
<1482171933-180601-1-git-send-email-bmwill@google.com>

Add the `RECURSE_SUBMODULES_ONLY` enum value to submodule.h. This enum value will be used in a later patch to push to indicate that only submodules should be pushed, while the superproject should remain unpushed.

Signed-off-by: Brandon Williams <bmwill@google.com>
---
 submodule-config.c | 2 ++
 submodule.h        | 1 +
 2 files changed, 3 insertions(+)
diff --git a/submodule-config.c b/submodule-config.c
index 098085b..33eb62d 100644
--- a/submodule-config.c
+++ b/submodule-config.c
@@ -251,6 +251,8 @@ static int parse_push_recurse(const char *opt, const char *arg,
 			return RECURSE_SUBMODULES_ON_DEMAND;
 		else if (!strcmp(arg, "check"))
 			return RECURSE_SUBMODULES_CHECK;
+		else if (!strcmp(arg, "only"))
+			return RECURSE_SUBMODULES_ONLY;
 		else if (die_on_error)
 			die("bad %s argument: %s", opt, arg);
 		else
diff --git a/submodule.h b/submodule.h
index 23d7668..4a83a4c 100644
--- a/submodule.h
+++ b/submodule.h
@@ -6,6 +6,7 @@ struct argv_array;
 struct sha1_array;
 
 enum {
+	RECURSE_SUBMODULES_ONLY = -5,
 	RECURSE_SUBMODULES_CHECK = -4,
 	RECURSE_SUBMODULES_ERROR = -3,
 	RECURSE_SUBMODULES_NONE = -2,
-- 
2.8.0.rc3.226.g39d4020
Previous: Brandon WilliamsNext: Brandon Williams
Message 3 of 7 in “push only submodules”
  1. 0/3 push only submodulesBrandon Williams, Dec 19, 2016
  2. 1/3 transport: refactor flag #defines to be more readableBrandon Williams, Dec 19, 2016
  3. 2/3 submodules: add RECURSE_SUBMODULES_ONLY valueBrandon Williams, Dec 19, 2016
  4. 3/3 push: add option to push only submodulesBrandon Williams, Dec 19, 2016
  5. Stefan BellerDec 19, 2016
  6. Junio C HamanoDec 19, 2016
  7. Junio C HamanoDec 20, 2016

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.