Merge branch 'ab/retire-advice-config'

Code clean up to migrate callers from older advice_config[] based
API to newer advice_if_enabled() and advice_enabled() API.

* ab/retire-advice-config:
  advice: move advice.graftFileDeprecated squashing to commit.[ch]
  advice: remove use of global advice_add_embedded_repo
  advice: remove read uses of most global `advice_` variables
  advice: add enum variants for missing advice variables
This commit is contained in:
Junio C Hamano
2021-09-10 11:46:29 -07:00
25 changed files with 63 additions and 166 deletions

View File

@ -1334,7 +1334,7 @@ const char *find_hook(const char *name)
err = errno;
#endif
if (err == EACCES && advice_ignored_hook) {
if (err == EACCES && advice_enabled(ADVICE_IGNORED_HOOK)) {
static struct string_list advise_given = STRING_LIST_INIT_DUP;
if (!string_list_lookup(&advise_given, name)) {