submodules: add RECURSE_SUBMODULES_ONLY value
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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Williams committed
Dec 19, 2016 at 10:25 UTC
6c656c3fe4ba13cdf03ed85c059690653fd376cb
2 files changed
+3
submodule-config.c
+2
@@ -251,6 +251,8 @@ static int parse_push_recurse(const char *opt, const char *arg,
251
return RECURSE_SUBMODULES_ON_DEMAND;
252
else if (!strcmp(arg, "check"))
253
return RECURSE_SUBMODULES_CHECK;
254
+ else if (!strcmp(arg, "only"))
255
+ return RECURSE_SUBMODULES_ONLY;
256
else if (die_on_error)
257
die("bad %s argument: %s", opt, arg);
258
else
submodule.h
+1
@@ -6,6 +6,7 @@ struct argv_array;
6
struct sha1_array;
7
8
enum {
9
+ RECURSE_SUBMODULES_ONLY = -5,
10
RECURSE_SUBMODULES_CHECK = -4,
11
RECURSE_SUBMODULES_ERROR = -3,
12
RECURSE_SUBMODULES_NONE = -2,