ref-filter: introduce match_atom_name()
authorKarthik Nayak <redacted>
Fri, 11 Sep 2015 14:59:47 +0000 (20:29 +0530)
committerJunio C Hamano <redacted>
Thu, 17 Sep 2015 17:02:48 +0000 (10:02 -0700)
commit40a7551d25efac7979ee1a675c05e67313205444
tree3e5573b8f264463ead90ecfe82760e7b7386e9f4
parent63d89fbce11c358ab73bdbb0d36919a454b2f5a6
ref-filter: introduce match_atom_name()

Introduce match_atom_name() which helps in checking if a particular
atom is the atom we're looking for and if it has a value attached to
it or not.

Use it instead of starts_with() for checking the value of %(color:...)
atom. Write a test for the same.

Mentored-by: Christian Couder <redacted>
Mentored-by: Matthieu Moy <redacted>
Thanks-to: Junio C Hamano <redacted>
Signed-off-by: Karthik Nayak <redacted>
Signed-off-by: Junio C Hamano <redacted>
ref-filter.c
t/t6302-for-each-ref-filter.sh
git clone https://git.99rst.org/PROJECT