usability: don't ask questions if no reply is required
[gitweb.git] / submodule-config.c
index 4bf50f398a5bd705531e32f9329c0e3b7e630506..bb069bc09734f473598d78493c1c08b1b4bd85e2 100644 (file)
@@ -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
@@ -331,7 +333,7 @@ static int parse_config(const char *var, const char *value, void *data)
                         strcmp(value, "all") &&
                         strcmp(value, "none"))
                        warning("Invalid parameter '%s' for config option "
-                                       "'submodule.%s.ignore'", value, var);
+                                       "'submodule.%s.ignore'", value, name.buf);
                else {
                        free((void *) submodule->ignore);
                        submodule->ignore = xstrdup(value);