Re: [PATCH 02/15] ref-filter: implement %(if:equals=) and %(if:notequals=)

2016-03-07 Thread Karthik Nayak
On Tue, Mar 8, 2016 at 11:34 AM, Junio C Hamano wrote: > On Mon, Mar 7, 2016 at 9:41 PM, Karthik Nayak wrote: >> >> 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 d

Re: [PATCH 02/15] ref-filter: implement %(if:equals=) and %(if:notequals=)

2016-03-07 Thread Junio C Hamano
On Mon, Mar 7, 2016 at 9:41 PM, Karthik Nayak wrote: > > 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

Re: [PATCH 02/15] ref-filter: implement %(if:equals=) and %(if:notequals=)

2016-03-07 Thread Karthik Nayak
On Tue, Mar 8, 2016 at 4:19 AM, Junio C Hamano wrote: > Karthik Nayak writes: > >> diff --git a/ref-filter.c b/ref-filter.c >> index 41e73f0..440e270 100644 >> --- a/ref-filter.c >> +++ b/ref-filter.c >> @@ -22,6 +22,8 @@ struct align { >> }; >> >> struct if_then_else { >> + const char *if_

Re: [PATCH 02/15] ref-filter: implement %(if:equals=) and %(if:notequals=)

2016-03-07 Thread Junio C Hamano
Karthik Nayak writes: > diff --git a/ref-filter.c b/ref-filter.c > index 41e73f0..440e270 100644 > --- a/ref-filter.c > +++ b/ref-filter.c > @@ -22,6 +22,8 @@ struct align { > }; > > struct if_then_else { > + const char *if_equals, > + *not_equals; > unsigned int then_at

[PATCH 02/15] ref-filter: implement %(if:equals=) and %(if:notequals=)

2016-03-06 Thread Karthik Nayak
Implement %(if:equals=) wherein the if condition is only satisfied if the value obtained between the %(if:...) and %(then) atom is the same as the given ''. Similarly, implement (if:notequals=) wherein the if condition is only satisfied if the value obtained between the %(if:...) and %(then) atom