]> git.ipfire.org Git - thirdparty/git.git/commitdiff
submodule--helper: drop "update --prefix <pfx>" for "-C <pfx> update"
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Tue, 8 Nov 2022 14:10:39 +0000 (15:10 +0100)
committerTaylor Blau <me@ttaylorr.com>
Tue, 8 Nov 2022 19:55:30 +0000 (14:55 -0500)
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>
builtin/submodule--helper.c
git-submodule.sh

index fefedcf8097053eb689fe31f8315def47c6a5530..03d1b58acaa5d070e7dd2d8b6b4625e74b242b80 100644 (file)
@@ -2643,9 +2643,6 @@ static int module_update(int argc, const char **argv, const char *prefix)
                         N_("traverse submodules recursively")),
                OPT_BOOL('N', "no-fetch", &opt.nofetch,
                         N_("don't fetch new objects from the remote site")),
-               OPT_STRING(0, "prefix", &opt.prefix,
-                          N_("path"),
-                          N_("path into the working tree")),
                OPT_SET_INT(0, "checkout", &opt.update_default,
                        N_("use the 'checkout' update strategy (default)"),
                        SM_UPDATE_CHECKOUT),
@@ -2701,6 +2698,7 @@ static int module_update(int argc, const char **argv, const char *prefix)
        }
 
        opt.filter_options = &filter_options;
+       opt.prefix = prefix;
 
        if (opt.update_default)
                opt.update_strategy.type = opt.update_default;
index d359f171379cab7b8d7a81042bf961ccc356240a..9a50f2e9124492589aa3a298a8bec74dbded8e32 100755 (executable)
@@ -343,7 +343,6 @@ cmd_update()
                ${recursive:+--recursive} \
                ${init:+--init} \
                ${nofetch:+--no-fetch} \
-               ${wt_prefix:+--prefix "$wt_prefix"} \
                ${rebase:+--rebase} \
                ${merge:+--merge} \
                ${checkout:+--checkout} \