Merge branch 'mf/no-dashed-subcommands'
[gitweb.git] / builtin / push.c
index a597759d8fac205f41c406d0a0e32f9240941190..2ac81042292ef1852ec9a31dea34ec91a1b796e3 100644 (file)
@@ -2,6 +2,7 @@
  * "git push"
  */
 #include "cache.h"
+#include "config.h"
 #include "refs.h"
 #include "run-command.h"
 #include "builtin.h"
@@ -480,7 +481,7 @@ static int git_push_config(const char *k, const char *v, void *cb)
        } else if (!strcmp(k, "push.gpgsign")) {
                const char *value;
                if (!git_config_get_value("push.gpgsign", &value)) {
-                       switch (git_config_maybe_bool("push.gpgsign", value)) {
+                       switch (git_parse_maybe_bool(value)) {
                        case 0:
                                set_push_cert_flags(flags, SEND_PACK_PUSH_CERT_NEVER);
                                break;
@@ -498,6 +499,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);