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:48 +0200
committerJunio C Hamano <gitster@pobox.com>2022-09-02 18:16:23 +0200
commit9fb2a970e9ffe5e37637f25b700e8bc09789fbf2 (patch)
tree5997c109c7bb10c6688bc21ad47aba76f5a874a2 /builtin/submodule--helper.c
parenttest-tool submodule-config: remove unused "--url" handling (diff)
downloadgit-9fb2a970e9ffe5e37637f25b700e8bc09789fbf2.tar.xz
git-9fb2a970e9ffe5e37637f25b700e8bc09789fbf2.zip
submodule--helper: move "is-active" to a test-tool
Create a new "test-tool submodule" and move the "is-active" subcommand over to it. It was added in 5c2bd8b77ae (submodule--helper: add is-active subcommand, 2017-03-16), since a452128a36c (submodule--helper: introduce add-config subcommand, 2021-08-06) it hasn't been used by git-submodule.sh. Since we're creating a command dispatch similar to test-tool.c itself let's split out the "struct test_cmd" into a new test-tool-utils.h, which both this new code and test-tool.c itself can use. 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 'builtin/submodule--helper.c')
-rw-r--r--builtin/submodule--helper.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
index 47ed24c6a6..b2fc732b5d 100644
--- a/builtin/submodule--helper.c
+++ b/builtin/submodule--helper.c
@@ -2728,14 +2728,6 @@ static int absorb_git_dirs(int argc, const char **argv, const char *prefix)
return 0;
}
-static int is_active(int argc, const char **argv, const char *prefix)
-{
- if (argc != 2)
- die("submodule--helper is-active takes exactly 1 argument");
-
- return !is_submodule_active(the_repository, argv[1]);
-}
-
/*
* Exit non-zero if any of the submodule names given on the command line is
* invalid. If no names are given, filter stdin to print only valid names
@@ -3313,7 +3305,6 @@ static struct cmd_struct commands[] = {
{"summary", module_summary, 0},
{"push-check", push_check, 0},
{"absorbgitdirs", absorb_git_dirs, SUPPORT_SUPER_PREFIX},
- {"is-active", is_active, 0},
{"check-name", check_name, 0},
{"config", module_config, 0},
{"set-url", module_set_url, 0},