diff options
author | Ben Boeckel <mathstuf@gmail.com> | 2021-08-23 10:44:00 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-08-25 19:07:52 (GMT) |
commit | ed9bff0817d5a7500b50a39c1c35b44aa3e72578 (patch) | |
tree | 2fbf27448d1085ad518e03a6c2a6c7902d271a28 /builtin/fetch.c | |
parent | 69290551b9a4fa22e76612926e131f926c6c9f11 (diff) | |
download | git-ed9bff0817d5a7500b50a39c1c35b44aa3e72578.zip git-ed9bff0817d5a7500b50a39c1c35b44aa3e72578.tar.gz git-ed9bff0817d5a7500b50a39c1c35b44aa3e72578.tar.bz2 |
advice: remove read uses of most global `advice_` variables
In c4a09cc9ccb (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>
Diffstat (limited to 'builtin/fetch.c')
-rw-r--r-- | builtin/fetch.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/fetch.c b/builtin/fetch.c index 25740c1..2501e1d 100644 --- a/builtin/fetch.c +++ b/builtin/fetch.c @@ -1229,7 +1229,7 @@ static int store_updated_refs(const char *raw_url, const char *remote_name, " 'git remote prune %s' to remove any old, conflicting " "branches"), remote_name); - if (advice_fetch_show_forced_updates) { + if (advice_enabled(ADVICE_FETCH_SHOW_FORCED_UPDATES)) { if (!fetch_show_forced_updates) { warning(_(warn_show_forced_updates)); } else if (forced_updates_ms > FORCED_UPDATES_DELAY_WARNING_IN_MS) { |