Merge branch 'pc/submodule-helper' into next
authorJunio C Hamano <gitster@pobox.com>
Wed, 28 Mar 2018 06:08:51 +0000 (23:08 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 28 Mar 2018 06:08:51 +0000 (23:08 -0700)
Rewrite two more "git submodule" subcommands in C.

* pc/submodule-helper:
submodule deinit: handle non existing pathspecs gracefully

1  2 
builtin/submodule--helper.c
index ee020d4749623ba57a3a72d236504f0636ee9062,b5d37137984adff7d0ba5622f6d75dbe5f2f5daf..6ba8587b6d3b7b8b1bc7a96451916c60210b093b
@@@ -1019,7 -1019,7 +1019,7 @@@ static int module_deinit(int argc, cons
  
        struct option module_deinit_options[] = {
                OPT__QUIET(&quiet, N_("Suppress submodule status output")),
 -              OPT__FORCE(&force, N_("Remove submodule working trees even if they contain local changes")),
 +              OPT__FORCE(&force, N_("Remove submodule working trees even if they contain local changes"), 0),
                OPT_BOOL(0, "all", &all, N_("Unregister all submodules")),
                OPT_END()
        };
                die(_("Use '--all' if you really want to deinitialize all submodules"));
  
        if (module_list_compute(argc, argv, prefix, &pathspec, &list) < 0)
-               BUG("module_list_compute should not choke on empty pathspec");
+               return 1;
  
        info.prefix = prefix;
        if (quiet)