Skip to content

Commit 64f48ad

Browse files
avarttaylorr
authored andcommitted
submodule--helper: remove --prefix from "absorbgitdirs"
Let's pass the "-C <prefix>" option instead to "absorbgitdirs" from its only caller. When it was added in f6f8586 (submodule: add absorb-git-dir function, 2016-12-12) there were other "submodule--helper" subcommands that were invoked with "-C <prefix>", so we could have done this all along. Suggested-by: Glen Choo <[email protected]> Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Taylor Blau <[email protected]>
1 parent 82ff877 commit 64f48ad

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

builtin/submodule--helper.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2831,9 +2831,6 @@ static int absorb_git_dirs(int argc, const char **argv, const char *prefix)
28312831
struct pathspec pathspec = { 0 };
28322832
struct module_list list = MODULE_LIST_INIT;
28332833
struct option embed_gitdir_options[] = {
2834-
OPT_STRING(0, "prefix", &prefix,
2835-
N_("path"),
2836-
N_("path into the working tree")),
28372834
OPT_END()
28382835
};
28392836
const char *const git_submodule_helper_usage[] = {

git-submodule.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ cmd_sync()
557557

558558
cmd_absorbgitdirs()
559559
{
560-
git submodule--helper absorbgitdirs --prefix "$wt_prefix" "$@"
560+
git ${wt_prefix:+-C "$wt_prefix"} submodule--helper absorbgitdirs "$@"
561561
}
562562

563563
# This loop parses the command line arguments to find the

0 commit comments

Comments
 (0)