From: SZEDER Gábor Date: Sun, 2 Oct 2016 16:35:11 +0000 (+0200) Subject: ref-filter: strip format option after a field name only once while parsing X-Git-Tag: v2.10.2~36^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/e94ce1394e17e1b91b943b8d41131b6aadb96b88?hp=e94ce1394e17e1b91b943b8d41131b6aadb96b88 ref-filter: strip format option after a field name only once while parsing When parse_ref_filter_atom() iterates over a list of valid atoms to check that a field name is one of them, it has to strip the optional colon-separated format option suffix that might follow the field name. However, it does so inside the loop, i.e. it performs the exact same stripping over and over again. Move stripping the format option suffix out of that loop, so it's only performed once for each parsed field name. Signed-off-by: SZEDER Gábor Signed-off-by: Junio C Hamano ---