submodule--helper: remove resolve-relative-url subcommand
The shell subcommand `resolve-relative-url` is no longer required, as its last caller has been removed when it was converted to C. Signed-off-by: Atharva Raykar <raykar.ath@gmail.com> Mentored-by: Christian Couder <christian.couder@gmail.com> Mentored-by: Shourya Shukla <periperidip@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Atharva Raykar committed
Aug 10, 2021 at 17:16 UTC
15fe88d5a6275c79eb0a4e6e56b5bf5d0a30a4fc
1 file changed
-20
builtin/submodule--helper.c
-20
@@ -223,25 +223,6 @@ static char *compute_submodule_clone_url(const char *rel_url, const char *up_pat
223
return resolved_url;
224
}
225
226
-static int resolve_relative_url(int argc, const char **argv, const char *prefix)
227
-{
228
- const char *up_path = NULL;
229
- char *res;
230
- const char *url;
231
-
232
- if (argc != 2 && argc != 3)
233
- die("resolve-relative-url only accepts one or two arguments");
234
-
235
- url = argv[1];
236
- if (argc == 3)
237
- up_path = argv[2];
238
-
239
- res = compute_submodule_clone_url(url, up_path, 1);
240
- puts(res);
241
- free(res);
242
- return 0;
243
-}
244
-
226
static int resolve_relative_url_test(int argc, const char **argv, const char *prefix)
227
{
228
char *remoteurl, *res;
@@ -3119,7 +3100,6 @@ static struct cmd_struct commands[] = {
3100
{"update-clone", update_clone, 0},
3101
{"ensure-core-worktree", ensure_core_worktree, 0},
3102
{"relative-path", resolve_relative_path, 0},
3122
- {"resolve-relative-url", resolve_relative_url, 0},
3103
{"resolve-relative-url-test", resolve_relative_url_test, 0},
3104
{"foreach", module_foreach, SUPPORT_SUPER_PREFIX},
3105
{"init", module_init, SUPPORT_SUPER_PREFIX},