diff options
author | Atharva Raykar <raykar.ath@gmail.com> | 2021-08-10 17:16:39 +0530 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-08-10 11:45:12 -0700 |
commit | ba8a3b019ed796fcf5224c2b2280eb1ebc129075 (patch) | |
tree | 9e3d978a223655ea89cb2cf850161cd2a8a32abd /builtin/submodule--helper.c | |
parent | f006132c243249f0eef01ba31b415426650e0916 (diff) | |
download | git-ba8a3b019ed796fcf5224c2b2280eb1ebc129075.tar.gz |
submodule--helper: remove add-config subcommand
Also no longer needed is this subcommand, as all of its functionality is
being called by the newly-introduced `module_add()` directly within 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>
Diffstat (limited to 'builtin/submodule--helper.c')
-rw-r--r-- | builtin/submodule--helper.c | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c index 1c81f15a24..28610706f5 100644 --- a/builtin/submodule--helper.c +++ b/builtin/submodule--helper.c @@ -2940,54 +2940,6 @@ static void configure_added_submodule(struct add_data *add_data) } } -static int add_config(int argc, const char **argv, const char *prefix) -{ - int force = 0; - struct add_data add_data = ADD_DATA_INIT; - - struct option options[] = { - OPT_STRING('b', "branch", &add_data.branch, - N_("branch"), - N_("branch of repository to store in " - "the submodule configuration")), - OPT_STRING(0, "url", &add_data.repo, - N_("string"), - N_("url to clone submodule from")), - OPT_STRING(0, "resolved-url", &add_data.realrepo, - N_("string"), - N_("url to clone the submodule from, after it has " - "been dereferenced relative to parent's url, " - "in the case where <url> is a relative url")), - OPT_STRING(0, "path", &add_data.sm_path, - N_("path"), - N_("where the new submodule will be cloned to")), - OPT_STRING(0, "name", &add_data.sm_name, - N_("string"), - N_("name of the new submodule")), - OPT__FORCE(&force, N_("allow adding an otherwise ignored submodule path"), - PARSE_OPT_NOCOMPLETE), - OPT_END() - }; - - const char *const usage[] = { - N_("git submodule--helper add-config " - "[--force|-f] [--branch|-b <branch>] " - "--url <url> --resolved-url <resolved-url> " - "--path <path> --name <name>"), - NULL - }; - - argc = parse_options(argc, argv, prefix, options, usage, 0); - - if (argc) - usage_with_options(usage, options); - - add_data.force = !!force; - configure_added_submodule(&add_data); - - return 0; -} - static void die_on_index_match(const char *path, int force) { struct pathspec ps; @@ -3162,7 +3114,6 @@ static struct cmd_struct commands[] = { {"list", module_list, 0}, {"name", module_name, 0}, {"clone", module_clone, 0}, - {"add-config", add_config, 0}, {"add", module_add, SUPPORT_SUPER_PREFIX}, {"update-module-mode", module_update_module_mode, 0}, {"update-clone", update_clone, 0}, |