advice: remove read uses of most global advice_ variables
In c4a09cc9cc (Merge branch 'hw/advise-ng', 2020-03-25), a new API for
accessing advice variables was introduced and deprecated `advice_config`
in favor of a new array, `advice_setting`.
This patch ports all but two uses which read the status of the global
`advice_` variables over to the new `advice_enabled` API. We'll deal
with advice_add_embedded_repo and advice_graft_file_deprecated
separately.
Signed-off-by: Ben Boeckel <mathstuf@gmail.com>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
69290551b9
commit
ed9bff0817
@ -1724,7 +1724,7 @@ static int add_possible_reference_from_superproject(
|
||||
} else {
|
||||
switch (sas->error_mode) {
|
||||
case SUBMODULE_ALTERNATE_ERROR_DIE:
|
||||
if (advice_submodule_alternate_error_strategy_die)
|
||||
if (advice_enabled(ADVICE_SUBMODULE_ALTERNATE_ERROR_STRATEGY_DIE))
|
||||
advise(_(alternate_error_advice));
|
||||
die(_("submodule '%s' cannot add alternate: %s"),
|
||||
sas->submodule_name, err.buf);
|
||||
|
||||
Reference in New Issue
Block a user