On Mon, Feb 17, 2020 at 10:39 AM Heba Waly via GitGitGadget <gitgitgadget@xxxxxxxxx> wrote: > > +int advice_enabled(enum advice_type type) > +{ > + int value = 1; > + char *key = xstrfmt("%s.%s", "advice", advice_config_keys[type]); > + git_config_get_bool(key, &value); > + return value; > +} > + > +int advice_push_update_rejected_enabled(void) > +{ > + return advice_enabled(PUSH_UPDATE_REJECTED) || > + advice_enabled(PUSH_UPDATE_REJECTED_ALIAS); > + > +} I just realized that the return value in this function should be && instead of || (if any of the config variables is 0, then the advice should be disabled), will fix that in the next round. I'll probably remove this function and add a switch case to advice_enabled() to handle this case as well as another one that I came across while migrating the rest of the calls to the new helpers. Will post an updated version soon. > -- > gitgitgadget >