On Fri, Mar 29, 2024 at 10:28:34AM -0700, Junio C Hamano wrote: > Rubén Justo <rjusto@xxxxxxxxx> writes: > > > This series is a simple change, in builtin/add.c, from: > > > > if (advice_enabled(XXX)) > > advise(MMM) > > I wonder if a coccinelle rule can automatically identify and rewrite > these ... > > > > > to the newer: > > > > advise_if_enabled(XXX, MMM) > > ... to this form automatically. I don't have a solid opinion on that but, after a cursory review, I have doubts a simple rule could catch enough cases to make it worth the effort. And, let's hope that the new code will utilize the new API for its convenience.