summaryrefslogtreecommitdiffstats
path: root/builtin/submodule--helper.c
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2022-09-01 01:17:45 +0200
committerJunio C Hamano <gitster@pobox.com>2022-09-02 18:16:23 +0200
commit76d63ddc467c28263d7c5f48baf3894354056743 (patch)
treef3abb4c2af3b6df742e26f8f91ff81b1f432c9d2 /builtin/submodule--helper.c
parentsubmodule tests: test for "add <repository> <abs-path>" (diff)
downloadgit-76d63ddc467c28263d7c5f48baf3894354056743.tar.xz
git-76d63ddc467c28263d7c5f48baf3894354056743.zip
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>
Diffstat (limited to '')
-rw-r--r--builtin/submodule--helper.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
index fac52ade5e..ac2553ba9d 100644
--- a/builtin/submodule--helper.c
+++ b/builtin/submodule--helper.c
@@ -771,24 +771,6 @@ static int module_status(int argc, const char **argv, const char *prefix)
return 0;
}
-static int module_name(int argc, const char **argv, const char *prefix)
-{
- const struct submodule *sub;
-
- if (argc != 2)
- usage(_("git submodule--helper name <path>"));
-
- sub = submodule_from_path(the_repository, null_oid(), argv[1]);
-
- if (!sub)
- die(_("no submodule mapping found in .gitmodules for path '%s'"),
- argv[1]);
-
- printf("%s\n", sub->name);
-
- return 0;
-}
-
struct module_cb {
unsigned int mod_src;
unsigned int mod_dst;
@@ -3359,7 +3341,6 @@ struct cmd_struct {
static struct cmd_struct commands[] = {
{"list", module_list, 0},
- {"name", module_name, 0},
{"clone", module_clone, SUPPORT_SUPER_PREFIX},
{"add", module_add, 0},
{"update", module_update, SUPPORT_SUPER_PREFIX},