test-tool submodule-config: remove unused "--url" handling

No test has used this "--url" parameter since the test code that made use of it was removed in 32bc548329d (submodule-config: remove support for overlaying repository config, 2017-08-03). 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 255a1ae5dab68ba1e310077b20c69bd92ad899d2
1 file changed +2 -9
t/helper/test-submodule-config.c
+2 -9
@@ -15,14 +15,11 @@ int cmd__submodule_config(int argc, const char **argv)
15 {
16 const char **arg = argv;
17 int my_argc = argc;
18 - int output_url = 0;
18 int lookup_name = 0;
19
20 arg++;
21 my_argc--;
22 while (arg[0] && starts_with(arg[0], "--")) {
24 - if (!strcmp(arg[0], "--url"))
25 - output_url = 1;
23 if (!strcmp(arg[0], "--name"))
24 lookup_name = 1;
25 arg++;
@@ -57,12 +54,8 @@ int cmd__submodule_config(int argc, const char **argv)
54 if (!submodule)
55 die_usage(argc, argv, "Submodule not found.");
56
60 - if (output_url)
61 - printf("Submodule url: '%s' for path '%s'\n",
62 - submodule->url, submodule->path);
63 - else
64 - printf("Submodule name: '%s' for path '%s'\n",
65 - submodule->name, submodule->path);
57 + printf("Submodule name: '%s' for path '%s'\n", submodule->name,
58 + submodule->path);
59
60 arg += 2;
61 }