Re: [PATCH 02/15] ref-filter: implement %(if:equals=<string>) and %(if:notequals=<string>)
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 8, 2016, 06:04 UTC
- Message-ID
- <CAPc5daVvD53KcX3RQkLiUtc5fe+hksYtQw7dK5+C=1eQdTT24w@mail.gmail.com>
- In-Reply-To
- <CAOLa=ZSFD39HXSw8jo1=ehiKpeqjLUSfc0NkRJD0BSbqAvDwuQ@mail.gmail.com>
On Mon, Mar 7, 2016 at 9:41 PM, Karthik Nayak <karthik.188@gmail.com> wrote:
Show 5 quoted lines
> > You're correct, the "handler" functions run once for each "ref". But WRT > to the %(if)...%(then)...%(else)...%(end) atoms, it needs to be. Because > each outcome of these atoms depend on the current outcome of the fields > used between then WRT to the current ref.
Yeah, there is no argument against that part at all. My comment was purely about preparsing the if_equals field. All other fields are preparsed in *parse() helper functions and it looked strange that only these two are scanned in the handle() function every time it is evaluated for each ref, only to yield the same result.