@@ -2618,7 +2618,7 @@ static int module_update(int argc, const char **argv, const char *prefix)
OPT_BOOL(0, "progress", &opt.progress,
N_("force cloning progress")),
OPT_BOOL(0, "require-init", &opt.require_init,
- N_("disallow cloning into non-empty directory")),
+ N_("disallow cloning into non-empty directory, implies --init")),
OPT_BOOL(0, "single-branch", &opt.single_branch,
N_("clone only one branch, HEAD or --branch")),
OPT_PARSE_LIST_OBJECTS_FILTER(&filter_options),
@@ -2642,6 +2642,9 @@ static int module_update(int argc, const char **argv, const char *prefix)
argc = parse_options(argc, argv, prefix, module_update_options,
git_submodule_helper_usage, 0);
+ if (opt.require_init)
+ opt.init = 1;
+
if (filter_options.choice && !opt.init) {
usage_with_options(git_submodule_helper_usage,
module_update_options);
@@ -251,7 +251,6 @@ cmd_update()
init=1
;;
--require-init)
- init=1
require_init=1
;;
--remote)