Skip to content

Commit 1b6e200

Browse files
avarttaylorr
authored andcommitted
submodule--helper: drop "update --prefix <pfx>" for "-C <pfx> update"
Since 29a5e9e (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 <[email protected]> Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Taylor Blau <[email protected]>
1 parent 64f48ad commit 1b6e200

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

builtin/submodule--helper.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2643,9 +2643,6 @@ static int module_update(int argc, const char **argv, const char *prefix)
26432643
N_("traverse submodules recursively")),
26442644
OPT_BOOL('N', "no-fetch", &opt.nofetch,
26452645
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")),
26492646
OPT_SET_INT(0, "checkout", &opt.update_default,
26502647
N_("use the 'checkout' update strategy (default)"),
26512648
SM_UPDATE_CHECKOUT),
@@ -2701,6 +2698,7 @@ static int module_update(int argc, const char **argv, const char *prefix)
27012698
}
27022699

27032700
opt.filter_options = &filter_options;
2701+
opt.prefix = prefix;
27042702

27052703
if (opt.update_default)
27062704
opt.update_strategy.type = opt.update_default;

git-submodule.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,6 @@ cmd_update()
343343
${recursive:+--recursive} \
344344
${init:+--init} \
345345
${nofetch:+--no-fetch} \
346-
${wt_prefix:+--prefix "$wt_prefix"} \
347346
${rebase:+--rebase} \
348347
${merge:+--merge} \
349348
${checkout:+--checkout} \

0 commit comments

Comments
 (0)