summaryrefslogtreecommitdiff
path: root/builtin/push.c
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2017-06-01 00:30:49 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-06-01 01:36:36 (GMT)
commit4e53d6a54122b6034b9b0346c84e3e5525aed542 (patch)
treef7ba6e878313def6b1ac8d18fd0d40956beef229 /builtin/push.c
parent9071c078af637573a3068c6920dd4ceff6a5a69f (diff)
downloadgit-4e53d6a54122b6034b9b0346c84e3e5525aed542.zip
git-4e53d6a54122b6034b9b0346c84e3e5525aed542.tar.gz
git-4e53d6a54122b6034b9b0346c84e3e5525aed542.tar.bz2
builtin/push.c: respect 'submodule.recurse' option
The closest mapping from the boolean 'submodule.recurse' set to "yes" to the variety of submodule push modes is "on-demand", so implement that. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/push.c')
-rw-r--r--builtin/push.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/builtin/push.c b/builtin/push.c
index a597759..258648d 100644
--- a/builtin/push.c
+++ b/builtin/push.c
@@ -498,6 +498,10 @@ static int git_push_config(const char *k, const char *v, void *cb)
const char *value;
if (!git_config_get_value("push.recursesubmodules", &value))
recurse_submodules = parse_push_recurse_submodules_arg(k, value);
+ } else if (!strcmp(k, "submodule.recurse")) {
+ int val = git_config_bool(k, v) ?
+ RECURSE_SUBMODULES_ON_DEMAND : RECURSE_SUBMODULES_OFF;
+ recurse_submodules = val;
}
return git_default_config(k, v, NULL);