git-submodule.sh: remove unused $prefix variable

Remove the $prefix variable which isn't used anymore, and hasn't been since b3c5f5cb048 (submodule: move core cmd_update() logic to C, 2022-03-15). Before that we'd use it to invoke "git submodule--helper" with the "--recursive-prefix" option, but since b3c5f5cb048 that "git submodule--helper" option is only used when it invokes itself. So the "--recursive-prefix" option is still in use, but at this point only when the helper invokes itself during submodule recursion. See the "--recursive-prefix" option added in c51f8f94e5b (submodule--helper: run update procedures from C, 2021-08-24). Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ævar Arnfjörð Bjarmason committed Jun 28, 2022 at 12:05 UTC 960fad98e8a8d4c123bb5040f616f856cb9925ea
1 file changed +2 -4
git-submodule.sh
+2 -4
@@ -41,7 +41,6 @@ files=
41 remote=
42 nofetch=
43 update=
44 -prefix=
44 custom_name=
45 depth=
46 progress=
@@ -127,7 +126,7 @@ cmd_add()
126 usage
127 fi
128
130 - git ${wt_prefix:+-C "$wt_prefix"} ${prefix:+--super-prefix "$prefix"} submodule--helper add ${GIT_QUIET:+--quiet} ${force:+--force} ${progress:+"--progress"} ${branch:+--branch "$branch"} ${reference_path:+--reference "$reference_path"} ${dissociate:+--dissociate} ${custom_name:+--name "$custom_name"} ${depth:+"$depth"} -- "$@"
129 + git ${wt_prefix:+-C "$wt_prefix"} submodule--helper add ${GIT_QUIET:+--quiet} ${force:+--force} ${progress:+"--progress"} ${branch:+--branch "$branch"} ${reference_path:+--reference "$reference_path"} ${dissociate:+--dissociate} ${custom_name:+--name "$custom_name"} ${depth:+"$depth"} -- "$@"
130 }
131
132 #
@@ -189,7 +188,7 @@ cmd_init()
188 shift
189 done
190
192 - git ${wt_prefix:+-C "$wt_prefix"} ${prefix:+--super-prefix "$prefix"} submodule--helper init ${GIT_QUIET:+--quiet} -- "$@"
191 + git ${wt_prefix:+-C "$wt_prefix"} submodule--helper init ${GIT_QUIET:+--quiet} -- "$@"
192 }
193
194 #
@@ -346,7 +345,6 @@ cmd_update()
345 ${init:+--init} \
346 ${nofetch:+--no-fetch} \
347 ${wt_prefix:+--prefix "$wt_prefix"} \
349 - ${prefix:+--recursive-prefix "$prefix"} \
348 ${update:+--update "$update"} \
349 ${reference:+"$reference"} \
350 ${dissociate:+"--dissociate"} \