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 in5c2bd8b77a(submodule--helper: add is-active subcommand, 2017-03-16), sincea452128a36(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>
This commit is contained in:
committed by
Junio C Hamano
parent
255a1ae5da
commit
9fb2a970e9
9
t/helper/test-tool-utils.h
Normal file
9
t/helper/test-tool-utils.h
Normal file
@ -0,0 +1,9 @@
|
||||
#ifndef TEST_TOOL_UTILS_H
|
||||
#define TEST_TOOL_UTILS_H
|
||||
|
||||
struct test_cmd {
|
||||
const char *name;
|
||||
int (*fn)(int argc, const char **argv);
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user