Skip to content

Commit ba8a3b0

Browse files
tfidfwastakengitster
authored andcommitted
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 <[email protected]> Mentored-by: Christian Couder <[email protected]> Mentored-by: Shourya Shukla <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f006132 commit ba8a3b0

File tree

1 file changed

+0
-49
lines changed

1 file changed

+0
-49
lines changed

builtin/submodule--helper.c

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -2940,54 +2940,6 @@ static void configure_added_submodule(struct add_data *add_data)
29402940
}
29412941
}
29422942

2943-
static int add_config(int argc, const char **argv, const char *prefix)
2944-
{
2945-
int force = 0;
2946-
struct add_data add_data = ADD_DATA_INIT;
2947-
2948-
struct option options[] = {
2949-
OPT_STRING('b', "branch", &add_data.branch,
2950-
N_("branch"),
2951-
N_("branch of repository to store in "
2952-
"the submodule configuration")),
2953-
OPT_STRING(0, "url", &add_data.repo,
2954-
N_("string"),
2955-
N_("url to clone submodule from")),
2956-
OPT_STRING(0, "resolved-url", &add_data.realrepo,
2957-
N_("string"),
2958-
N_("url to clone the submodule from, after it has "
2959-
"been dereferenced relative to parent's url, "
2960-
"in the case where <url> is a relative url")),
2961-
OPT_STRING(0, "path", &add_data.sm_path,
2962-
N_("path"),
2963-
N_("where the new submodule will be cloned to")),
2964-
OPT_STRING(0, "name", &add_data.sm_name,
2965-
N_("string"),
2966-
N_("name of the new submodule")),
2967-
OPT__FORCE(&force, N_("allow adding an otherwise ignored submodule path"),
2968-
PARSE_OPT_NOCOMPLETE),
2969-
OPT_END()
2970-
};
2971-
2972-
const char *const usage[] = {
2973-
N_("git submodule--helper add-config "
2974-
"[--force|-f] [--branch|-b <branch>] "
2975-
"--url <url> --resolved-url <resolved-url> "
2976-
"--path <path> --name <name>"),
2977-
NULL
2978-
};
2979-
2980-
argc = parse_options(argc, argv, prefix, options, usage, 0);
2981-
2982-
if (argc)
2983-
usage_with_options(usage, options);
2984-
2985-
add_data.force = !!force;
2986-
configure_added_submodule(&add_data);
2987-
2988-
return 0;
2989-
}
2990-
29912943
static void die_on_index_match(const char *path, int force)
29922944
{
29932945
struct pathspec ps;
@@ -3162,7 +3114,6 @@ static struct cmd_struct commands[] = {
31623114
{"list", module_list, 0},
31633115
{"name", module_name, 0},
31643116
{"clone", module_clone, 0},
3165-
{"add-config", add_config, 0},
31663117
{"add", module_add, SUPPORT_SUPER_PREFIX},
31673118
{"update-module-mode", module_update_module_mode, 0},
31683119
{"update-clone", update_clone, 0},

0 commit comments

Comments
 (0)