Subject: [PATCH 12/13] submodule--helper: remove relative-path subcommand

From: Atharva Raykar <[email-masked]>
Date: Tue, 7 Sep 2021 17:29:31 +0530

This subcommand was once used extensively for submodule functionality
when it was written in shell, but now that we have converted the shell
code to C, it is no longer used.

Mentored-by: Christian Couder <[email-masked]>
Mentored-by: Shourya Shukla <[email-masked]>
Signed-off-by: Atharva Raykar <[email-masked]>
---
 builtin/submodule--helper.c | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
index 9470ff3de0..7622d6bd24 100644
--- a/builtin/submodule--helper.c
+++ b/builtin/submodule--helper.c
@@ -2582,17 +2582,6 @@ static int run_update_procedure(int argc, const char **argv, const char *prefix)
 	return 3;
 }
 
-static int resolve_relative_path(int argc, const char **argv, const char *prefix)
-{
-	struct strbuf sb = STRBUF_INIT;
-	if (argc != 3)
-		die("submodule--helper relative-path takes exactly 2 arguments, got %d", argc);
-
-	printf("%s", relative_path(argv[1], argv[2], &sb));
-	strbuf_release(&sb);
-	return 0;
-}
-
 static const char *remote_submodule_branch(const char *path)
 {
 	const struct submodule *sub;
@@ -3413,7 +3402,6 @@ static struct cmd_struct commands[] = {
 	{"add-clone", add_clone, 0},
 	{"update", module_update, 0},
 	{"run-update-procedure", run_update_procedure, 0},
-	{"relative-path", resolve_relative_path, 0},
 	{"resolve-relative-url", resolve_relative_url, 0},
 	{"resolve-relative-url-test", resolve_relative_url_test, 0},
 	{"foreach", module_foreach, SUPPORT_SUPER_PREFIX},
-- 
2.32.0