Re: [PATCH/RFC 01/10] ref-filter: introduce a parsing function for each atom in valid_atom
- From
Karthik Nayak <karthik.188@gmail.com>
- Date
- Dec 12, 2015, 16:05 UTC
- Message-ID
- <CAOLa=ZQKQE-iyNY2gyZXMxPANHzJr0GoDJVuts3qb-izDKVVsQ@mail.gmail.com>
- In-Reply-To
- <xmqqio44eijo.fsf@gitster.mtv.corp.google.com>
On Sat, Dec 12, 2015 at 3:48 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 17 quoted lines
> Karthik Nayak <karthik.188@gmail.com> writes: > >>> This problem will go away if you introduce the 'valid_atom' field in >>> the patch which actually needs it (as suggested above) rather than in >>> this patch. >> >> Yup, agreed. >> Thanks for your suggestions. > > In addition, most of the lines in this patch should become > unnecessary even after you start using the "parser" field. > > As the majority of fields are compared as strings, and only a > selected few fields need custom parsers, you do not have to > explicitly write FIELD_STR everywhere, as long as you make sure the > value of FIELD_STR is zero (and use parser==NULL as a sign that no > custom parser is used, which I think you already do).
True, currently I've changed it to only add the new parser function values only wherever required.
-- Regards, Karthik Nayak