submodule--helper: drop "update --prefix <pfx>" for "-C <pfx> update"
Since 29a5e9e1ffe (submodule--helper update-clone: learn --init, 2022-03-04) we've been passing "-C <prefix>" from "git-submodule.sh" whenever we pass "--prefix <prefix>", so the latter is redundant to the former. Let's drop the "--prefix" option. Suggested-by: Glen Choo <chooglen@google.com> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Taylor Blau <me@ttaylorr.com>
Ævar Arnfjörð Bjarmason committed
Nov 8, 2022 at 15:10 UTC
1b6e2001c7fd96214b1fe2f910fad5cbb60b607a
2 files changed
+1
-4
builtin/submodule--helper.c
+1
-3
@@ -2643,9 +2643,6 @@ static int module_update(int argc, const char **argv, const char *prefix)
2643
N_("traverse submodules recursively")),
2644
OPT_BOOL('N', "no-fetch", &opt.nofetch,
2645
N_("don't fetch new objects from the remote site")),
2646
- OPT_STRING(0, "prefix", &opt.prefix,
2647
- N_("path"),
2648
- N_("path into the working tree")),
2646
OPT_SET_INT(0, "checkout", &opt.update_default,
2647
N_("use the 'checkout' update strategy (default)"),
2648
SM_UPDATE_CHECKOUT),
@@ -2701,6 +2698,7 @@ static int module_update(int argc, const char **argv, const char *prefix)
2698
}
2699
2700
opt.filter_options = &filter_options;
2701
+ opt.prefix = prefix;
2702
2703
if (opt.update_default)
2704
opt.update_strategy.type = opt.update_default;
git-submodule.sh
-1
@@ -343,7 +343,6 @@ cmd_update()
343
${recursive:+--recursive} \
344
${init:+--init} \
345
${nofetch:+--no-fetch} \
346
- ${wt_prefix:+--prefix "$wt_prefix"} \
346
${rebase:+--rebase} \
347
${merge:+--merge} \
348
${checkout:+--checkout} \