[PATCH 11/13] submodule--helper: remove print-default-remote subcommand
From: Atharva Raykar <hidden>
Date: 2021-09-07 12:00:45
Subsystem:
the rest · Maintainer:
Linus Torvalds
This subcommand was once useful for submodule functionality, but after the various conversions of shell code to C, it is no longer used. Mentored-by: Christian Couder [off-list ref] Mentored-by: Shourya Shukla [off-list ref] Signed-off-by: Atharva Raykar <redacted> --- builtin/submodule--helper.c | 16 ---------------- 1 file changed, 16 deletions(-)
diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
index 597e303889..9470ff3de0 100644
--- a/builtin/submodule--helper.c
+++ b/builtin/submodule--helper.c@@ -73,21 +73,6 @@ static char *get_default_remote(void) return repo_get_default_remote(the_repository, refname); } -static int print_default_remote(int argc, const char **argv, const char *prefix) -{ - char *remote; - - if (argc != 1) - die(_("submodule--helper print-default-remote takes no arguments")); - - remote = get_default_remote(); - if (remote) - printf("%s\n", remote); - - free(remote); - return 0; -} - static int starts_with_dot_slash(const char *str) { return str[0] == '.' && is_dir_sep(str[1]);
@@ -3434,7 +3419,6 @@ static struct cmd_struct commands[] = { {"foreach", module_foreach, SUPPORT_SUPER_PREFIX}, {"init", module_init, SUPPORT_SUPER_PREFIX}, {"status", module_status, SUPPORT_SUPER_PREFIX}, - {"print-default-remote", print_default_remote, 0}, {"sync", module_sync, SUPPORT_SUPER_PREFIX}, {"deinit", module_deinit, 0}, {"summary", module_summary, SUPPORT_SUPER_PREFIX},
--
2.32.0