[PATCH 2/3] submodules: add RECURSE_SUBMODULES_ONLY value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]