ref-filter: introduce refname_atom_parser_internal()
commitb180e6fe19ee4cf701d3a3478025dd7125fb0749
authorKarthik Nayak <karthik.188@gmail.com>
Tue, 10 Jan 2017 08:49:43 +0000 (10 14:19 +0530)
committerJunio C Hamano <gitster@pobox.com>
Tue, 10 Jan 2017 20:44:31 +0000 (10 12:44 -0800)
tree63302719f3b458b269f74fe7c55a0b9373a33b80
parent01f95825d55b2ca36ee9bc131a5f6899f47621c6
ref-filter: introduce refname_atom_parser_internal()

Since there are multiple atoms which print refs ('%(refname)',
'%(symref)', '%(push)', '%(upstream)'), it makes sense to have a common
ground for parsing them. This would allow us to share implementations of
the atom modifiers between these atoms.

Introduce refname_atom_parser_internal() to act as a common parsing
function for ref printing atoms. This would eventually be used to
introduce refname_atom_parser() and symref_atom_parser() and also be
internally used in remote_ref_atom_parser().

Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Karthik Nayak <Karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
ref-filter.c