submodule API & "absorbgitdirs": remove "----recursive" option
Remove the "----recursive" option to "git submodule--helper
absorbgitdirs" (yes, with 4 dashes, not 2).
This option and all the "else" when "flags &
ABSORB_GITDIR_RECURSE_SUBMODULES" is false has never been used since
it was added in f6f8586140
(submodule: add absorb-git-dir function,
2016-12-12), which we'd have had to do as "----recursive", a
"--recursive" would have errored out.
It would be nice to follow-up with an optbug() assertion to
parse-options.c for such funnily named options, I manually validated
that this was the only long option whose name started with "-", but
let's skip adding such an assertion for now.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
This commit is contained in:

committed by
Taylor Blau

parent
46e87b5482
commit
82ff87789b
@ -1379,8 +1379,7 @@ static void deinit_submodule(const char *path, const char *prefix,
|
||||
".git file by using absorbgitdirs."),
|
||||
displaypath);
|
||||
|
||||
absorb_git_dir_into_superproject(path,
|
||||
ABSORB_GITDIR_RECURSE_SUBMODULES);
|
||||
absorb_git_dir_into_superproject(path);
|
||||
|
||||
}
|
||||
|
||||
@ -2831,13 +2830,10 @@ static int absorb_git_dirs(int argc, const char **argv, const char *prefix)
|
||||
int i;
|
||||
struct pathspec pathspec = { 0 };
|
||||
struct module_list list = MODULE_LIST_INIT;
|
||||
unsigned flags = ABSORB_GITDIR_RECURSE_SUBMODULES;
|
||||
struct option embed_gitdir_options[] = {
|
||||
OPT_STRING(0, "prefix", &prefix,
|
||||
N_("path"),
|
||||
N_("path into the working tree")),
|
||||
OPT_BIT(0, "--recursive", &flags, N_("recurse into submodules"),
|
||||
ABSORB_GITDIR_RECURSE_SUBMODULES),
|
||||
OPT_END()
|
||||
};
|
||||
const char *const git_submodule_helper_usage[] = {
|
||||
@ -2853,7 +2849,7 @@ static int absorb_git_dirs(int argc, const char **argv, const char *prefix)
|
||||
goto cleanup;
|
||||
|
||||
for (i = 0; i < list.nr; i++)
|
||||
absorb_git_dir_into_superproject(list.entries[i]->name, flags);
|
||||
absorb_git_dir_into_superproject(list.entries[i]->name);
|
||||
|
||||
ret = 0;
|
||||
cleanup:
|
||||
|
Reference in New Issue
Block a user