Re: [PATCH v17 05/14] ref-filter: introduce match_atom_name()
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 10, 2015, 17:23 UTC
- Message-ID
- <xmqqpp1q428y.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <vpqbndap6d1.fsf@scolette.imag.fr>
Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
> OTOH, you are now accepting %(atom:) as a synonym to %(atom), and it's > not clear whether this is a deliberate decition.
I would say so. When the caller wants to reject %(atom:), the caller can tell it by checking val[0] == '\0' and reject that.
So it is better if you did not do this:
Show 5 quoted lines
> if (!body[1]) {
> /* "atom_name:" */
> *val = NULL;
> return 1;
> }which robs that information from the caller. It should be sufficient to just drop the check that allows "colorx" when expecting "color" without making any other change, I would think.