git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Brandon Williams <bmwill@google.com>
To: git@vger.kernel.org
Cc: sbeller@google.com, Brandon Williams <bmwill@google.com>
Subject: [PATCH 2/3] submodules: add RECURSE_SUBMODULES_ONLY value
Date: Mon, 19 Dec 2016 10:25:32 -0800	[thread overview]
Message-ID: <1482171933-180601-3-git-send-email-bmwill@google.com> (raw)
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


  parent reply	other threads:[~2016-12-19 18:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-19 18:25 [PATCH 0/3] push only submodules Brandon Williams
2016-12-19 18:25 ` [PATCH 1/3] transport: refactor flag #defines to be more readable Brandon Williams
2016-12-19 18:25 ` Brandon Williams [this message]
2016-12-19 18:25 ` [PATCH 3/3] push: add option to push only submodules Brandon Williams
2016-12-19 18:56   ` Stefan Beller
2016-12-19 18:41 ` [PATCH 0/3] " Junio C Hamano
2016-12-20 19:25 ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1482171933-180601-3-git-send-email-bmwill@google.com \
    --to=bmwill@google.com \
    --cc=git@vger.kernel.org \
    --cc=sbeller@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).