submodule--helper: remove unused "name" helper

The "name" helper has not been used since e83e3333b57 (submodule: port submodule subcommand 'summary' from shell to C, 2020-08-13). Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Reviewed-by: Glen Choo <chooglen@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ævar Arnfjörð Bjarmason committed Sep 1, 2022 at 01:17 UTC 76d63ddc467c28263d7c5f48baf3894354056743
1 file changed -19
builtin/submodule--helper.c
-19
@@ -771,24 +771,6 @@ static int module_status(int argc, const char **argv, const char *prefix)
771 return 0;
772 }
773
774 -static int module_name(int argc, const char **argv, const char *prefix)
775 -{
776 - const struct submodule *sub;
777 -
778 - if (argc != 2)
779 - usage(_("git submodule--helper name <path>"));
780 -
781 - sub = submodule_from_path(the_repository, null_oid(), argv[1]);
782 -
783 - if (!sub)
784 - die(_("no submodule mapping found in .gitmodules for path '%s'"),
785 - argv[1]);
786 -
787 - printf("%s\n", sub->name);
788 -
789 - return 0;
790 -}
791 -
774 struct module_cb {
775 unsigned int mod_src;
776 unsigned int mod_dst;
@@ -3359,7 +3341,6 @@ struct cmd_struct {
3341
3342 static struct cmd_struct commands[] = {
3343 {"list", module_list, 0},
3362 - {"name", module_name, 0},
3344 {"clone", module_clone, SUPPORT_SUPER_PREFIX},
3345 {"add", module_add, 0},
3346 {"update", module_update, SUPPORT_SUPER_PREFIX},