submodule--helper update: use --super-prefix
commitd7a714fddc2062fd21fbeec779fb3b9034fc21c2
authorGlen Choo <chooglen@google.com>
Fri, 1 Jul 2022 02:11:56 +0000 (30 19:11 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 1 Jul 2022 05:41:46 +0000 (30 22:41 -0700)
treea9758d4ef618ff19abe439882e47fa9fea851969
parentb0f8b21305fd53d0bd3fa32cc1ee9fa9026cf321
submodule--helper update: use --super-prefix

Unlike the other subcommands, "git submodule--helper update" uses the
"--recursive-prefix" flag instead of "--super-prefix". The two flags are
otherwise identical (they only serve to compute the 'display path' of a
submodule), except that there is a dedicated helper function to get the
value of "--super-prefix".

This inconsistency exists because "git submodule update" used to pass
"--recursive-prefix" between shell and C (introduced in [1]) before
"--super-prefix" was introduced (in [2]), and for simplicity, we kept
this name when "git submodule--helper update" was created.

Remove "--recursive-prefix" and its associated code from "git
submodule--helper update", replacing it with "--super-prefix".

To use "--super-prefix", module_update is marked with
SUPPORT_SUPER_PREFIX. Note that module_clone must also be marked with
SUPPORT_SUPER_PREFIX, otherwise the "git submodule--helper clone"
subprocess will fail check because "--super-prefix" is propagated via
the environment.

[1] 48308681b0 (git submodule update: have a dedicated helper for
cloning, 2016-02-29)
[2] 74866d7579 (git: make super-prefix option, 2016-10-07)

Signed-off-by: Glen Choo <chooglen@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/submodule--helper.c