summaryrefslogtreecommitdiff
path: root/builtin/submodule--helper.c
diff options
context:
space:
mode:
authorLibravatar Atharva Raykar <raykar.ath@gmail.com>2021-08-10 17:16:38 +0530
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-08-10 11:45:11 -0700
commitf006132c243249f0eef01ba31b415426650e0916 (patch)
treee00464c96c1ad2d7f88dc62a13145eb66cf8a292 /builtin/submodule--helper.c
parentsubmodule--helper: convert the bulk of cmd_add() to C (diff)
downloadtgif-f006132c243249f0eef01ba31b415426650e0916.tar.xz
submodule--helper: remove add-clone subcommand
We no longer need 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.c60
1 files changed, 0 insertions, 60 deletions
diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
index 0e94e16f4d..1c81f15a24 100644
--- a/builtin/submodule--helper.c
+++ b/builtin/submodule--helper.c
@@ -2860,65 +2860,6 @@ static int add_submodule(const struct add_data *add_data)
return 0;
}
-static int add_clone(int argc, const char **argv, const char *prefix)
-{
- int force = 0, quiet = 0, dissociate = 0, progress = 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 checkout on cloning")),
- OPT_STRING(0, "prefix", &prefix,
- N_("path"),
- N_("alternative anchor for relative paths")),
- 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_STRING(0, "url", &add_data.realrepo,
- N_("string"),
- N_("url where to clone the submodule from")),
- OPT_STRING(0, "reference", &add_data.reference_path,
- N_("repo"),
- N_("reference repository")),
- OPT_BOOL(0, "dissociate", &dissociate,
- N_("use --reference only while cloning")),
- OPT_INTEGER(0, "depth", &add_data.depth,
- N_("depth for shallow clones")),
- OPT_BOOL(0, "progress", &progress,
- N_("force cloning progress")),
- OPT__FORCE(&force, N_("allow adding an otherwise ignored submodule path"),
- PARSE_OPT_NOCOMPLETE),
- OPT__QUIET(&quiet, "suppress output for cloning a submodule"),
- OPT_END()
- };
-
- const char *const usage[] = {
- N_("git submodule--helper add-clone [<options>...] "
- "--url <url> --path <path> --name <name>"),
- NULL
- };
-
- argc = parse_options(argc, argv, prefix, options, usage, 0);
-
- if (argc != 0)
- usage_with_options(usage, options);
-
- add_data.prefix = prefix;
- add_data.progress = !!progress;
- add_data.dissociate = !!dissociate;
- add_data.force = !!force;
- add_data.quiet = !!quiet;
-
- if (add_submodule(&add_data))
- return 1;
-
- return 0;
-}
-
static int config_submodule_in_gitmodules(const char *name, const char *var, const char *value)
{
char *key;
@@ -3221,7 +3162,6 @@ static struct cmd_struct commands[] = {
{"list", module_list, 0},
{"name", module_name, 0},
{"clone", module_clone, 0},
- {"add-clone", add_clone, 0},
{"add-config", add_config, 0},
{"add", module_add, SUPPORT_SUPER_PREFIX},
{"update-module-mode", module_update_module_mode, 0},