From: Heba Waly Date: Tue, 11 Feb 2020 02:01:33 GMT Subject: Re: [PATCH] advice: refactor advise API Message-ID: In-Reply-To: On Tue, Feb 11, 2020 at 11:46 AM Junio C Hamano wrote: > > > As I outlined in [1], I think the over-simplified > "advise_ng(, _(), ...)" would be too limited > to replace the current users, without a pair of helper functions, > one to just check for the guarding advise.key, and the other to > unconditionally show the message (i.e. the latter is what the > current advise() is). > I agree with adding the first helper, specially after Peff's comments, but I don't see why we would keep the current advise() which unconditionally shows the message... As far as I understand from a previous discussion [3], that's a wrong usage that we need to avoid, quoting from [3]: ``` If there are many other places that calls to advise() are made without getting guarded by the toggles defined in advice.c, we should fix them, I think. ``` > > [1] > > https://public-inbox.org/git/xmqqzhf5cw69.fsf@gitster-ct.c.googlers.com/ [3] https://public-inbox.org/git/xmqqpng1eisc.fsf@gitster-ct.c.googlers.com/