Re: [RFC/PATCH 04/11] ref-filter: add 'ifexists' atom
- From
Karthik Nayak <karthik.188@gmail.com>
- Date
- Aug 1, 2015, 06:46 UTC
- Message-ID
- <CAOLa=ZTC9xJu9WCnF9VVf9wRLSK4=R3576UJ6CqAC7GEGDbCOQ@mail.gmail.com>
- In-Reply-To
- <vpqh9omek39.fsf@anie.imag.fr>
On Thu, Jul 30, 2015 at 2:51 AM, Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> wrote:
Show 22 quoted lines
> Junio C Hamano <gitster@pobox.com> writes: > >> Junio C Hamano <gitster@pobox.com> writes: >> >>>> Couldn't think of a better replacer, any suggestions would be welcome :) >>> >>> See below. >>> ... >>> One way to do all of the above is ... >> >> Note that is just "one way", not the only or not necessarily the >> best. It certainly is not the easiest, I think. >> >> %(if:atom)...%(endif) >> >> might be easier to implement. > > And I find it easier to read or write too. Nested parenthesis in a > format string make them really tricky. That removes the need for > escaping since the content of the if/endif is a format string like the > others, it can use the same escaping rules (IIRC, %% to escape a %). >
THat's a really good point. Will work on this :)
-- Regards, Karthik Nayak